gettext / PO files
The classic translation catalog where msgid source strings map to msgstr translations, with context and language-specific plurals.
What it is
GNU gettext is the long-running catalog system behind a large part of Unix software, WordPress, and many server frameworks. Its editable PO files pair a source msgid with a translated msgstr, with optional comments, context through msgctxt, and plural entries through msgid_plural and indexed msgstr values. Build tools compile them into binary MO files for fast runtime lookup.
Reach for it when your language or framework already supports gettext, or when vendors need a mature format understood by almost every translation tool. The normal loop is xgettext to extract source messages, msgmerge to carry translations into an updated template, and msgfmt to validate and compile the result. Translators who never touch a terminal usually work in Poedit, which reads and writes the same PO files.
Gotcha: the visible source sentence often acts as the lookup key, so a punctuation edit can create a new untranslated message. Do not hand-renumber plural slots or assume every language has singular and plural only. Let gettext apply the catalog's Plural-Forms rule, and preserve comments, flags, and msgctxt when files pass through another tool.
Ask AI for it
Integrate GNU gettext into this project. Extract marked source messages into a POT template with xgettext, update each locale's PO file with msgmerge, validate catalogs with 'msgfmt --check', and compile MO files for production. Use pgettext for ambiguous labels such as 'Open' and ngettext for counts instead of choosing singular or plural in application code. Preserve translator comments and format flags, fail CI on malformed placeholders, and never overwrite an existing msgstr during extraction.