Introduction
AI-powered translation SDK for build time.
What is translate-kit?
In 2026, manually writing i18n JSON files key by key is obsolete. AI handles translation now, but ad-hoc prompts create inconsistent results across files. translate-kit is a single tool that handles the entire translation pipeline at build time, powered by AI, with zero runtime cost.
It extracts translatable strings from your JSX/TSX, generates semantic keys with AI, replaces hardcoded text with i18n calls, and translates everything to your target locales — using your own AI models via Vercel AI SDK. Compatible with next-intl.
What Makes It Different
- Build-time, not runtime — translation happens before you ship. No client-side SDK, no loading spinners, no runtime overhead. The output is static JSON files that next-intl serves directly.
- Zero dependency footprint — translate-kit is not a runtime dependency. It generates standard next-intl code and JSON files. If you remove translate-kit tomorrow, your app keeps working exactly the same.
- AI-native, provider-agnostic — works with any AI model from any provider (OpenAI, Anthropic, Google, Mistral, Groq). The AI receives full context: project description, glossary, tone, namespace structure.
- Incremental by default — a lock file tracks SHA-256 hashes. Only changed keys get sent to the AI on re-runs, keeping costs predictable and API calls fast.
- Scanner understands code — parses your AST, distinguishes user-facing text from code artifacts, and filters automatically. No manual string extraction.
How It Works
translate-kit provides a three-step pipeline:
scan → codegen → translate- Scan — parse JSX/TSX files, extract translatable strings, generate semantic keys via AI
- Codegen — replace hardcoded strings with
t("key")calls or<T id="key">text</T>components - Translate — diff source messages against a lock file, translate only new/modified keys
You can use any step independently or run the full pipeline with translate-kit run. The translate command is the most commonly used on its own — write your source messages manually and let translate-kit handle the rest.
Two Modes
- Keys mode (default) — strings replaced with
t("key")calls, source text moves to JSON files. Works with next-intl'suseTranslations. - Inline mode — strings wrapped with
<T id="key">text</T>, source text stays visible in your code. See the Inline Mode guide.
Incremental by Default
A .translate-lock.json file tracks source hashes so re-runs only translate what changed. This keeps API calls fast and costs low.