Skip to content

ai-i18n-toolsTranslate apps & docs with any LLM

Extract t() strings, translate Markdown, MDX, JSON bundles, and SVG labels — all from one config, with OpenAI, Anthropic, Gemini, OpenRouter, Ollama, or any OpenAI-compatible API. Switch models per project or per locale without rewriting your codebase.

ai-i18n-tools logo

npm version npm downloads Node.js License: MIT CI

Quick install ​

The published package is ESM-only. Node.js >=22.16.0 required.

bash
pnpm add ai-i18n-tools
# Set API key for your active provider — see preset table (default init: openrouter)
export OPENROUTER_API_KEY=sk-or-v1-your-key-here
ai-i18n-tools init [-P <provider>]
ai-i18n-tools sync

See Installation for configuring the bare CLI command (including cloned-monorepo development) and Quick start for scaffold templates.

Which pipeline should I use? ​

Your contentCommand
Source code uses t()UI strings — extract / translate-ui
Localized pages or docs sitesDocuments — translate-docs
Standalone nested JSON locale filesJSON — translate-json

SVG illustrations use a separate translate-svg path — not docs[].contentPaths. See What is ai-i18n-tools? for a full comparison.

Explore the documentation ​

  • Guide — translation modes, installation, quick start, and framework integrations
  • Integrations — VitePress, Nextra, Fumadocs, Docusaurus, and Astro
  • Providers and models — presets, fallback chains, and -P overrides
  • CLI reference — every command, flag, and workflow
  • Configuration — full ai-i18n-tools.config.json schema
  • Examples — twelve runnable demo projects with npx degit
  • Architecture — internals, programmatic API, and extension points

Integrating the package into your own project? Start with AI Agent Context. The repository README is a short GitHub/npm landing page that links here for detail.



Disclaimer

Product names and icons belong to their respective owners and are used for identification purposes only. This software is not affiliated with or endorsed by those brands.

All interface and documentation languages except English (UK) were translated with AI using this package (ai-i18n-tools); the wording may be imprecise or contain errors.


Released under the MIT License.