Skip to content

Add a Locale

  1. Add the locale code to lingui.config.js or lingui.config.ts.
  2. Run lingui extract.
  3. Fill in the new catalog entries (the extracted .po or .json files contain one entry per message; provide the translated string for each). See the official catalog format reference for file format details.
  4. Run lingui compile.
  5. Update the app’s locale resolution and catalog loading. See Load Compiled Catalogs for patterns.
  6. Verify one page in the new locale end to end.

Usually these parts change:

  • lingui.config.js or lingui.config.ts
  • locale catalogs
  • locale loading code
  • locale selection UI or routing

These parts usually do not change:

  • existing macro call sites
  • framework transform configuration