Localize a React Native app

Translate an existing JSON message catalog with the CLI and load the generated language files in your React Native app.

React Native apps can use react-i18next with JSON translation files. Lingo.dev translates those files through a configured localization engine while your existing message library chooses the locale and renders the messages.

This workflow starts with an existing keyed catalog. Keep its message keys, interpolation syntax, plural convention, and runtime setup.

Configure the source catalog #

For a source at src/locales/en.json, initialize the CLI from the project root:

sh
npm install --global @lingo.dev/cli
lingo login
lingo init --source en --targets es,fr,de,ja --files 'src/locales/en.json' --yes
lingo link

The resulting .lingo/config.json has this shape. Keep the actual organization and engine IDs produced by linking:

json
{
  "orgId": "org_...",
  "engineId": "eng_...",
  "sourceLocale": "en",
  "targetLocales": ["es", "fr", "de", "ja"],
  "files": [{ "pattern": "src/locales/en.json" }]
}

The CLI detects JSON from the extension and derives target paths such as src/locales/es.json. Select only source catalogs; generated targets should not become additional sources. Add an entry for each source namespace when the app uses several files.

Translate and load the messages #

Create the missing target files:

sh
lingo push --backfill-missing --wait

After completion, inspect the generated JSON. Include the target catalogs in the app's existing resource imports or loader and register them under the language and namespace used by react-i18next. The runtime configuration and the CLI's targetLocales must describe the same supported languages.

Open a screen in a target language on a device or emulator. Exercise a label, an interpolated value, and the app's plural forms. Confirm that it loads the target catalog rather than silently showing the source-language fallback.

Keep later source changes in sync #

Commit the configuration, source, accepted targets, and .lingo/lock.json together. After editing source messages, run:

sh
lingo push --wait

Review the changed catalogs and repeat the screen checks before release. For automation, use the GitHub App or CI workflow. JSON format controls and preserving reviewed translations cover file behavior and retrieval.