Translate

Translate gettext .po files

A .po file is text-keyed: the English sentence is the key. Contexts, plural slots and Python-style variables all sit around that text. KAERIS keeps them and writes the plural slots the target language needs.

How a .po file is built

Each entry has a msgid (the source text) and a msgstr (the translation). msgctxt tells two identical sentences apart. Plurals use msgid_plural and one msgstr[n] per form, and the header's Plural-Forms line says how many forms the language has.

Source fileen.po
msgid ""
msgstr ""
"Content-Type: text/plain; charset=UTF-8\n"
"Plural-Forms: nplurals=2; plural=(n != 1);\n"

#: app/views.py:12
msgid "Welcome back, %(name)s!"
msgstr ""

#: app/views.py:20
msgid "%(count)d file"
msgid_plural "%(count)d files"
msgstr[0] ""
msgstr[1] ""

msgctxt "menu"
msgid "Open"
msgstr ""

msgctxt "verb"
msgid "Open"
msgstr ""

What to watch for in .po translations

A real run: translated to German and checked

A real run, 27 October 2026, nothing edited by hand: kaeris translate en.po --langs de with kaeris 0.2.35, 3.9 seconds, model google/gemini-2.5-flash-lite, the free-tier default. Below, the German file it wrote and what kaeris check says about it.

German resultde.po
# Generated by KAERIS i18n Tool
# Language: de
msgid ""
msgstr ""
"Content-Type: text/plain; charset=UTF-8\n"
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
"Language: de\n"

msgid "Welcome back, %(name)s!"
msgstr "Willkommen zurück, %(name)s!"

msgid "%(count)d file"
msgid_plural "%(count)d files"
msgstr[0] "%(count)d Datei"
msgstr[1] "%(count)d Dateien"

msgctxt "menu"
msgid "Open"
msgstr "Öffnen"

msgctxt "verb"
msgid "Open"
msgstr "Öffnen"
kaeris checkexit code 0
$ kaeris check --source en.po --langs de
✓ de: complete & placeholder-safe
✓ all locales complete & placeholder-safe

What KAERIS does with it

Run it in three steps

  1. Install the CLI

    Run pip install kaeris.

  2. Translate the catalog

    Run kaeris translate django.po --langs de,ja. Output files are named by language.

  3. Check the result

    Upload the source and a translated .po on the free check page to see lost variables and inconsistent terms.

pip install kaeris
kaeris translate locale/en/LC_MESSAGES/django.po --langs de,ja --verify

Questions

Does it handle plural forms for Russian or Arabic?

The plural header and the number of msgstr[n] slots are written for the target language. In a run with Russian the example source produced nplurals=3 and three slots.

What about msgctxt?

The context stays attached to the entry, so two identical sources with different contexts are separate strings. The check warns when they come back translated differently.

Is it free?

Yes, without an account: 10,000 characters per file and up to 8 languages per run. A free API key raises the file limit to 50,000 characters. Lifetime is $79 once, on your own OpenRouter key; monthly plans start at $19. Pricing

Can I run it from the terminal or in CI?

Yes. pip install kaeris, then kaeris translate django.po --langs de,ja. See also Django. The GitHub Action runs the same translation in a pull request. CLI docs · GitHub Action

Keep going

CLI reference · Check reference · Translate in the browser · Free check · Convert formats · Pseudo-localization

Other formats: JSON · YAML · ARB · XLIFF · .strings · .xcstrings · .properties · .resx · CSV · Markdown · Fluent · Android XML

Framework guides: react-i18next · next-intl · vue-i18n · Flutter · iOS · Android