How to localize a React Native app
React Native apps internationalize the same way React web apps do — react-i18next with JSON resources — plus a device-locale detector. Here’s the setup, and how to auto-translate and keep the JSON in sync.
i18n in React Native
The usual setup uses react-i18next + expo-localization. react-i18next loads JSON namespaces and resolves keys at runtime; a locale detector (expo-localization or react-native-localize) reads the device language at startup. Dynamic values use {{double-brace}} interpolation.
import i18n from 'i18next'
import { initReactI18next } from 'react-i18next'
import { getLocales } from 'expo-localization'
import en from './locales/en/translation.json'
import de from './locales/de/translation.json'
i18n.use(initReactI18next).init({
resources: { en: { translation: en }, de: { translation: de } },
lng: getLocales()[0]?.languageCode ?? 'en',
fallbackLng: 'en',
interpolation: { escapeValue: false },
})import { Text } from 'react-native'
import { useTranslation } from 'react-i18next'
export function Greeting() {
const { t } = useTranslation()
return <Text>{t('greeting', { name: 'Sam' })}</Text>
}Translate it with nlit
- 1Add your source-language strings to nlit as keys (import your existing files, or start fresh).
- 2Run AI auto-translate into every target language — the credit cost is shown before each run, and your glossary keeps brand terms intact.
- 3Review and approve, then pull the files into your repo with the CLI.
# .nlit.yaml
format: json-nested
output_dir: src/locales
platform: web # JSON resources, not native .strings/.xml
languages:
- de
- fr
- jasrc/locales/
de/
translation.json
fr/
translation.json
ja/
translation.jsonFormat for React Native: json-nested. See the CLI docs for every format and flag.
Things to watch for
- Bundle the JSON with your app (import it) so strings are available offline at first launch — don’t fetch them at runtime.
- Use react-i18next’s plural handling with nlit’s plural keys for correct CLDR forms per language.
- For RTL languages (Arabic, Hebrew), pair your translations with React Native’s I18nManager to flip layout direction.
FAQ
What’s the best way to localize React Native?
react-i18next with JSON resources plus expo-localization (or react-native-localize) for device-language detection is the most common, well-supported setup — and it maps directly to nlit’s JSON export.
How do I auto-translate a React Native app?
Add your source strings to nlit, run AI auto-translate, review, then pull the JSON into your app with the CLI and bundle it with the build.
Should I use native .strings/.xml or JSON for React Native?
For JS-driven UI, JSON with react-i18next is simplest. nlit also exports native iOS .strings and Android XML if you localize native modules separately.
Ship React Native in every language
Auto-translate your strings and pull them into your build. Free to start, no card.