Automate next-international Translations with AI
Babely translates your locales/[locale].ts modules while preserving TypeScript structure and nested keys — a lightweight alternative to next-intl for Next.js apps.
Why teams automate this
TypeScript locale files do not scale manually
next-international stores translations as typed TS modules. Copy-pasting across 10 locales means maintaining identical object shapes by hand.
Type safety breaks when strings diverge
Missing keys in target locales cause TypeScript errors or runtime fallbacks that are hard to catch before deploy.
No automated sync with source locale
When English copy changes, every target locales/[locale].ts file needs manual updates before you can ship.
How it works
Add Babely to your Next.js project
Initialize Babely and configure it to watch your next-international locale TypeScript files.
npx @babely/cli@latest initConfigure locales/[locale].ts
Point Babely at the path next-international expects. The example repo ships 10 target locales out of the box.
{
"locale": {
"source": "en",
"targets": ["de", "fr", "es", "sv"]
},
"files": {
"ts": {
"include": ["locales/[locale].ts"]
}
}
}Translate changed strings
Run translate after editing en.ts. Babely generates or updates target locale modules with matching structure.
npx @babely/cli@latest translateReview TypeScript diffs in Git
Check that exported object shapes match across locales before merging your pull request.
Example babely.json
Copy this config into your project root and adjust targets to match your locale folders.
{
"locale": {
"source": "en",
"targets": ["sv", "de", "fr", "it", "es", "pl", "no", "nl", "fi", "pt"]
},
"files": {
"ts": {
"include": ["locales/[locale].ts"]
}
}
}Why Babely for next-international
TypeScript locale modules
Babely writes valid locales/[locale].ts files that match your source module structure.
Multi-locale at scale
Translate into many target languages in one command — the example repo covers 10 locales.
Git diff detection
Only changed strings are translated, so pull requests stay focused and reviewable.
CI-ready CLI
Run Babely in GitHub Actions to keep every locale module in sync with English source copy.
Related documentation
Other use cases
next-intl
Babely translates your messages/[locale].json files while preserving ICU plurals, select rules, rich text tags, and nested keys — the same stack we use on babely.dev.
react-i18next
Babely translates your locales/[locale].json files while preserving {{interpolation}}, nested namespaces, and plural keys — the most widely used React i18n library.
Fumadocs
Ship multilingual documentation without duplicating your Fumadocs setup. Babely translates UI JSON and MDX content in one command — navigation labels, search UI, and every docs page.
Start translating your next-international project
Set up Babely in minutes, automate translations in CI, and ship multilingual products without enterprise localization overhead.
Frequently Asked Questions
Does Babely preserve TypeScript export structure?
Yes. Babely generates locale modules that mirror the shape of your English source file, keeping next-international type inference working.
Can I use Babely with the App Router?
Yes. Babely only manages locale files on disk. Your next-international setup, middleware, and routing stay unchanged.
How is this different from next-intl?
next-international uses TypeScript modules instead of JSON. Babely supports both — use the ts format in babely.json for this stack.
Does Babely replace next-international?
No. Babely automates translation file generation. Your app still uses next-international for runtime locale loading and switching.