I18n Ai Translate banner
taahamahdi taahamahdi

I18n Ai Translate

AI community

Description

Use ChatGPT, Gemini, DeepSeek, Llama, or Claude to translate your i18n JSON to any language

Installation

This entry records only its repository, not the path inside it, so there is no exact command to give. Open the source below and copy the folder into ~/.claude/skills/, or the file into ~/.claude/agents/.

README

i18n‑ai‑translate

AI‑powered localization for your **i18next‑style** JSON files. Automate translating of single files or entire directories with ChatGPT, Gemini, Claude, or local Ollama models -- while keeping accurate translations, formatting consistent, and intact `{{variables}}`.

_For a detailed walkthrough and advanced tips, see [ADVANCED_GUIDE.md](ADVANCED_GUIDE.md)._


Why use it?

Feature What it means
Multi‑engine Choose OpenAI, Google, Anthropic, or your own Ollama models
Safe translations Dual verification checks accuracy and formatting
Diff‑aware Only re‑translate keys you changed
Everywhere Use as a CLI, GitHub Action, or Node library
Dry‑run Preview updates before touching disk

Quick start

1 · Install

npm i -g i18n-ai-translate    # or yarn add i18n-ai-translate --dev
export OPENAI_API_KEY=•••     # or GEMINI_API_KEY / ANTHROPIC_API_KEY

2 · Translate a file

i18n-ai-translate translate -i i18n/en.json -o fr \
  -e chatgpt -m gpt-4o

Need more languages? Pass multiple codes (`-o fr es de`) or `-A` for **all** 180+.

3 · Translate a folder

i18n-ai-translate translate -i i18n/en -o fr es de \
  -e chatgpt -m gpt-4o

This recursively translates all `*.json` files in `en` and writes to `i18n/fr`, `i18n/es`, and `i18n/de`.

4 · Keep PRs up‑to‑date

Add a one‑liner GitHub Action to auto‑translate whenever `en.json` changes:

- uses: taahamahdi/i18n-ai-translate@master
  with:
    json-file-path: i18n/en.json
    api-key: ${{ secrets.OPENAI_API_KEY }}

CLI cheat‑sheet

# Translate a file or folder
translate   -i       -o    [options]

# Re‑transl