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.
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
Context changes the word
“Open” as a menu item and “Open” as a verb translate differently. KAERIS reads the context together with the text, and flags it when the same source word comes back translated two ways. In the real run below both came back as “Öffnen”, which is right in German, and the contexts stayed in the file.
Plural slots differ by language
English has two, Russian three, Arabic six. In a Russian run the header becomes
nplurals=3and each plural entry gets threemsgstrslots.Variables in the Python and C styles
%(name)s,%d,{name}must come back unchanged, or the app raises an error at runtime.The header and references
The header is rebuilt with the language and plural rule. Source-reference comments (
#:) are not carried into the translated file.
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.
# 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 check --source en.po --langs de ✓ de: complete & placeholder-safe ✓ all locales complete & placeholder-safe
What KAERIS does with it
Entries and contexts kept
Text keys,
msgctxtand plural pairs come back in the same order.Plural slots from the target language
The number of
msgstr[n]follows the language, checked in a run with Russian.Free check for this format
The free check on /check reads this format and runs without a key or an account. The terminal command
kaeris checkreads it too: it takes all 13 formats since kaeris 0.2.35, with the same rules and nothing sent anywhere.
Run it in three steps
Install the CLI
Run
pip install kaeris.Translate the catalog
Run
kaeris translate django.po --langs de,ja. Output files are named by language.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