init
Interactive setup wizard.
The init command runs an interactive wizard to set up translate-kit in your project.
Usage
translate-kit initWhat It Does
The wizard guides you through:
- Translation mode — keys mode (
t("key")) or inline mode (<T id="key">text</T>) - AI provider selection — choose from OpenAI, Anthropic, Google, Mistral, or Groq
- Model name — pick a specific model (e.g.
gpt-4o-mini) - Source locale — your source language (default:
en) - Target locales — languages to translate into
- Messages directory — where translation files live (default:
./messages) - Include patterns — which source files to scan (auto-detected)
- i18n library — the import source for
useTranslations(keys mode only) - Component path — import path for the
<T>component (inline mode only) - Project context — description for better translations
- Tone — translation style (professional, casual, etc.)
Generated Files
The wizard creates:
translate-kit.config.ts— your configuration file
Keys mode
For next-intl projects, it can also create:
i18n/request.ts— locale detection setup- Updates to
next.config.tswithcreateNextIntlPlugin
Inline mode
For inline mode, the wizard also:
- Copies
t.tsx(client component) andt-server.tsx(server component) to your project - Creates
src/i18n/index.tswithgetLocale()andgetMessages()helpers - Wraps your root layout with
I18nProviderand wires up locale detection
Full Pipeline
At the end, the wizard offers to run the full pipeline:
scan → codegen → translateThis scans your source code, replaces strings with t() calls, and generates translations in one step.