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

1

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"]
    }
  }
}
2

Extract messages with Lingui

Run lingui extract as usual to update your English catalog with new strings from your React components.

npx lingui extract
3

Translate with Babely

Run Babely translate to fill in target locale PO files. Plural forms and message IDs are preserved.

npx @babely/cli@latest translate
4

Compile and ship

Run lingui compile to generate runtime message catalogs, then commit PO files alongside your code.

npx lingui compile

Example 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.

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.

Neste steg

Lever hvert språk fra samme pipeline.

Logg inn med GitHub eller Google, koble arbeidsområdet ditt og synkroniser oversettelser via CLI eller CI/CD — slik at oppdateringer rulleres ut på alle språk uten å bremse releases.

Begynn å automatisere

3-day free trial