Skip to content

Add i18n to your project ​

This section is the set of walkthroughs for a project that speaks one language today. Start here. Each page below takes one kind of project from setup to the first translated files. Get started covers what the tool is, install options, and providers and models. You can open a walkthrough without reading those pages first.

What you do and what the tool does ​

YouThe tool
Pick the languages, a provider, and the models to tryExtracts text, translates it, checks the result, and writes catalogs or pages
Make the text visible: t() in app code, your site framework's i18n, or a language-list marker in a READMECaches every translation and reuses it on the next run
Load the files and check one languageShows progress, and lets you review wording in the Translation Dashboard

The walkthroughs say which source edits are yours. Coding-agent prompts are included where those edits are mechanical. The CLI writes the catalogs and the translated files. It does not install i18next or your site framework's i18n.

Shared setup ​

Every walkthrough follows the same order. The page you pick fills in the details.

  1. Install the CLI and set your provider's API key. Ollama needs no key. Installation and Provider and API key.
  2. Run init with the template that page names. This writes ai-i18n-tools.config.json.
  3. Prepare the project so the tool can see the text.
  4. Run ai-i18n-tools sync, then ai-i18n-tools status.
  5. Load the output, check one target language, and rerun sync when the source changes. The cache sends only new or changed text to the model.

Pages in this section ​

You havePageWhat that page covers
A JS/TS app (React, Next.js, Node, CLI) whose buttons and messages are still plain textAdd i18n to a JS/TS appInstall i18next, add the bootstrap, wrap literals in t(), then extract and translate-ui
A Python app (Streamlit, FastAPI, Flask, Django, gettext)Add i18n to a Python appWrap t() or _(), or keep GNU gettext. The CLI can run from a standalone executable with no Node.js install
A documentation or marketing site (VitePress, Starlight, Docusaurus, Nextra, Fumadocs, Astro, plain HTML)Add i18n to a website or docs siteEnable the framework's own language routes, then translate pages and theme labels
A repository README and other Markdown files, usually next to an appAdd i18n to your README and Markdown docsOne file per language (translated-docs/README.de.md) and a language row in the README. init --with-readme adds that block to any template
More than one of the above in one repositoryCombining pipelinesOne config and one sync. The usual pair is app UI strings plus the README
Intlayer dictionaries, and you want to keep IntlayerTranslating Intlayer in placetranslate-intlayer fills missing and stale leaves inside *.content.ts
Intlayer dictionaries, and you are moving off IntlayerMigrating from Intlayermigrate-intlayer seeds catalogs from the dictionaries and rewrites safe call sites to t()

An app that also has a README uses the app page and the README page together. A site that also has a README uses the website page, and init … --with-readme for the README block.

Where to go deeper ​

The walkthroughs stop once the first language is wired. The reference pages take over from there:

Released under the MIT License.