What it does
ai-i18n is a GitHub Action that translates an application's localization files with a language model. It extracts the strings from your translation files, translates the ones that are new or changed, and commits the results back to the repository. It can run on a push, a commit or a schedule. It reads XLIFF 1.2, XLIFF 2.0 and flat or nested JSON files, detecting the format automatically. A hash file records what has already been translated, so unchanged strings are not sent to the model again. Placeholders inside XLIFF inline elements are protected during translation and rebuilt afterwards, and plural forms follow CLDR rules for more than 20 languages. You choose the model provider: Anthropic, OpenAI, Ollama (self-hosted, no API key needed) or AWS Bedrock. Settings go in the workflow inputs or a YAML config file, and a dry-run option previews changes without writing files. The action skips runs triggered by its own commits to avoid loops. The project is open source under the MIT license, and its README presents it as a drop-in replacement for Lokalise, Phrase and Crowdin.
Capabilities
- Translates XLIFF 1.2, XLIFF 2.0 and flat or nested JSON files
- Content hashing so only new or changed strings are translated
- Works with Anthropic, OpenAI, Ollama or AWS Bedrock models
- Preserves XLIFF placeholders and handles plural forms by CLDR rules
- Commits translations back to the repository, with a dry-run mode
- Optional YAML config for batch size, retries, rate limits and translator context
When to use it
- Your app keeps translation files in a GitHub repository and you want them updated on each push
- You want to use your own model provider, including a self-hosted Ollama
- You want to avoid re-translating strings that have not changed
Alternatives to explore
- Lokalise
- Phrase
- Crowdin