Add a Locale
Typical workflow
Section titled “Typical workflow”- Add the locale code to
lingui.config.jsorlingui.config.ts. - Run
lingui extract. - Fill in the new catalog entries (the extracted
.poor.jsonfiles contain one entry per message; provide the translated string for each). See the official catalog format reference for file format details. - Run
lingui compile. - Update the app’s locale resolution and catalog loading. See Load Compiled Catalogs for patterns.
- Verify one page in the new locale end to end.
What changes and what does not
Section titled “What changes and what does not”Usually these parts change:
lingui.config.jsorlingui.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