i18next JSON v4
TransLocale for React & i18next.
Keep namespace files, interpolation, and language-specific plural forms in your existing i18next workflow.
1. Install
Run this from your application directory.
npm install @translocale/i18next i18next2. Connect your project
Create a cloud project and replace PROJECT_UUID with its ID. The source and target languages must match your local configuration. Adjust the example locales to your project.
npx translocale-i18next init --api https://translocale.io --project PROJECT_UUID --source en --locales en,fr,ar --namespaces common,checkoutApprove translation access in the browser:
npx translocale-i18next login --scope translateSign-in is shared with your other TransLocale tools for this project. Keep credentials in developer tooling or CI. Your deployed app reads its own translation files.
3. Wire up your app
Setup creates src/translocale-resources.ts with imports of local namespace files. Use those resources when initializing i18next, and use react-i18next in components. Download every configured target before building. Create a separate i18next instance for each server request.
4. Translate, review, and download
Inspect the plan before running translate. The example caps the job at 1,000 source characters across its target languages. Waiting stops after two minutes; a timeout leaves the job running.
npx translocale-i18next plan
npx translocale-i18next translate --max-characters 1000 --wait
npx translocale-i18next pull --job JOB_UUID --locale fr --revision 1
npx translocale-i18next checkReplace JOB_UUID with the completed job ID. Before pulling revision 1, save that revision in the dashboard and review its wording. Choose the exact saved revision you want to ship, then repeat pull for each target locale. Revision 0 is the original generated output.
Normal application builds use saved catalogs and make no paid translation requests.
Already have translations?
Run npx translocale-i18next discover --source en to inspect locale and namespace directories. Initialize from a reviewed candidate using the included discovery guide. Sync can merge a newer cloud revision with local edits across namespace files, with explicit choices for conflicts.
Current limits
- Default separators and JSON v4 plural suffixes are required. Legacy formats, dynamic nesting options, and custom separators are not supported.
- The React browser consumer and local Cloudflare server rendering have been tested. React Native device behavior remains pending.
The service accepts up to 100 KB and 200 messages per source document, with up to 10 target languages. Expanded target messages must also fit the adapter's limits. Read the file compatibility guide.