ai-i18n
FreeA GitHub Action that uses LLMs (Claude, GPT, Ollama) to automatically translate i18n localization files. #opensource
About ai-i18n
ai-i18n is an open-source GitHub Action that automates the translation of application i18n (internationalization) localization files using large language models (LLMs). It integrates directly into GitHub workflows, extracting strings from supported formats (XLIFF 1.2/2.0 and JSON flat/nested), translating only new or modified content via content hashing, and committing the results back to the repository. The action supports multiple LLM providers including Anthropic Claude, OpenAI, Ollama (self-hosted), and AWS Bedrock (with model-agnostic Converse API). It is CLDR-aware for ICU MessageFormat handling across 20+ languages and preserves XLIFF inline elements. Designed as a drop-in replacement for services like Lokalise, Phrase, and Crowdin, ai-i18n allows translations to ship alongside code changes with minimal manual effort.
Key Features
Pros & Cons
- Fully automated – runs on every push, commit, or schedule
- Cost-efficient – only new/modified strings are sent to the API
- Compatible with multiple popular LLM providers
- Open source and free to use (no per-translation fees)
- Preserves XLIFF inline elements like placeholders
- Integrates seamlessly into existing GitHub Actions workflows
- Requires an LLM API key (cost from provider, e.g., OpenAI, Anthropic)
- Limited to XLIFF and JSON formats (no YAML, PO, etc. mentioned)
- Dependent on GitHub Actions environment (not platform-agnostic)
- May need configuration for complex plural rules or custom contexts
- Self-hosted Ollama setup requires additional infrastructure