Automate Lingui Translations with AI
Babely translates your locales/[locale]/messages.po catalogs while preserving Gettext plurals, explicit message IDs, and component references — built for Lingui's PO-based workflow.
Why teams automate this
PO files are painful to edit by hand
Lingui extracts messages into .po catalogs with plural forms, contexts, and IDs. Translating these manually in a TMS or editor does not scale.
Plural rules vary by language
Each locale has different plural forms (one/few/many/other). Generic translators often break msgid/msgstr plural blocks.
Catalogs drift after extract
After lingui extract, new msgids appear in English but target locale PO files lag until someone manually updates them.
How it works
Configure Babely for PO files
Point Babely at your Lingui message catalogs. Match the path where lingui compile reads translations.
{
"locale": {
"source": "en",
"targets": ["de", "fr", "es"]
},
"files": {
"po": {
"include": ["locales/[locale]/messages.po"]
}
}
}Extract messages with Lingui
Run lingui extract as usual to update your English catalog with new strings from your React components.
npx lingui extractTranslate with Babely
Run Babely translate to fill in target locale PO files. Plural forms and message IDs are preserved.
npx @babely/cli@latest translateCompile and ship
Run lingui compile to generate runtime message catalogs, then commit PO files alongside your code.
npx lingui compileExample babely.json
Copy this config into your project root and adjust targets to match your locale folders.
{
"locale": {
"source": "en",
"targets": ["de"]
},
"files": {
"po": {
"include": ["locales/[locale]/messages.po"]
}
}
}Why Babely for Lingui
Gettext-native workflow
Babely works directly on .po files — no export/import round trip through a translation platform.
Plural forms preserved
msgid/msgstr plural blocks stay valid for each target language's plural rules.
Message IDs and references kept
Explicit IDs and source references from lingui extract remain intact after translation.
Git-friendly diffs
PO file changes are reviewable in pull requests alongside your component changes.
Related documentation
Other use cases
react-i18next
Babely translates your locales/[locale].json files while preserving {{interpolation}}, nested namespaces, and plural keys — the most widely used React i18n library.
next-intl
Babely translates your messages/[locale].json files while preserving ICU plurals, select rules, rich text tags, and nested keys — the same stack we use on babely.dev.
Nuxt
Babely translates your Nuxt locale JSON files while preserving linked keys, interpolation, and layout namespaces — the only Vue stack example in the Babely repo.
Start translating your Lingui project
Set up Babely in minutes, automate translations in CI, and ship multilingual products without enterprise localization overhead.
Frequently Asked Questions
Does Babely preserve Lingui message IDs?
Yes. Babely translates msgstr values while keeping msgid, context, and explicit IDs unchanged.
Are plural forms handled correctly?
Yes. Babely preserves Gettext plural blocks so lingui compile produces valid runtime catalogs for each locale.
When should I run Babely in my Lingui workflow?
Run lingui extract first to update the English catalog, then Babely translate to fill target locales, then lingui compile before shipping.
Does Babely replace Lingui?
No. Babely automates PO file translation. Lingui still handles extraction, compilation, and runtime React integration.