Setup
Run LazyLocales translation
Use the CLI to generate translated locale files:This writes files to your
localesDir (e.g., public/locales/):Configure i18next to load local files
Import your locale files directly:
i18n.ts
For dynamic loading with code splitting, use
i18next-http-backend pointed at your locale files served from /public/locales/ or your CDN.Dynamic loading from public directory
If you prefer to load translations dynamically at runtime, configurei18next-http-backend to fetch from your public directory:
i18n.ts
/public/locales/nl-NL.json), enabling updates without rebuilding your app.
CI/CD integration
Keep translations up to date in your deployment pipeline:.github/workflows/translate.yml