GNU Gettext PO File Formatter & Editor
Format, validate, and test GNU Gettext PO translation files with msgid, msgstr, msgid_plural, and printf placeholders (%s, %d).
Templates9
PO Editor
Valid Syntax
68 characters3 lines
Test Variables & Live Preview
Adjust variables and switch languages to verify CLDR plural rules
Locale:
No variables detected in message string.
Rendered Output (fr):
# Simple greeting
msgid "Hello, world!"
msgstr "Bonjour, le monde !"
Export to Intlayer Type-Safe Declaration
Intlayer validates translations at compile-time with full TypeScript autocomplete.
GNU Gettext PO Syntax Cheat Sheet
Quick syntax rules and how each pattern maps to Intlayer's type-safe declarations
| Feature | Syntax | Example | Notes | Intlayer Equivalent |
|---|---|---|---|---|
| Singular Message | msgid "..." \n msgstr "..." | msgid "Hello" \n msgstr "Bonjour" | msgid is source key, msgstr is translated text | t({ en: "Hello", fr: "Bonjour" }) |
| Plural Messages | msgid_plural "..." \n msgstr[N] "..." | msgid "file" \n msgid_plural "files" \n msgstr[0] "fichier" \n msgstr[1] "fichiers" | Plural-Forms header defines index calculation | plural({ one: "file", other: "{{count}} files" }) |
| Context (msgctxt) | msgctxt "context" \n msgid "..." | msgctxt "menu" \n msgid "File" | Disambiguates identical msgid in different contexts | Separate keys or select() nodes |
| Printf Specifiers | %s, %d, %1$s | msgid "%d items found" | Position-aware C printf formatters | {{count}} or named interpolations |
| Comments | # translator, #: reference, #, flag | #: src/app.tsx:42 | Standard PO comments generated by xgettext | TypeScript comments in .content.ts |
Intlayer compiler-driven architecture replaces complex runtime message parsing with compile-time type-safety and automated extraction.
Intlayer Ecosystem
Never Worry About Complex Syntax Again
Intlayer turns internationalization into a joyful developer experience with compile-time type-safety, automatic component extraction, and seamless CMS integration.