React Native
Supported formats: .json (flat/nested), i18next, react-intl (FormatJS)
Quick Start
bash
cd MyReactNativeApp
localekit scan # Detects React Native project
localekit status --detailed
localekit translate --engine openai --languages de-DE,fr-FR,ja-JPLocaleKit detects your i18n library from package.json and reads the appropriate JSON format. Supported libraries: i18next, react-intl (FormatJS), and plain flat/nested JSON.
Automate on Build
Add a prebuild script to your package.json to translate before every build:
json
{
"scripts": {
"pretranslate": "localekit translate --engine openai --languages de-DE,fr-FR,ja-JP || true",
"prebuild": "npm run pretranslate",
"prestart": "npm run pretranslate",
"build": "react-native build",
"start": "react-native start"
}
}Now npm run build and npm start will translate missing keys first.
INFO
The || true suffix ensures the build succeeds even if LocaleKit is not installed.
