ai-i18n logo

ai-i18n

Free

A GitHub Action that uses LLMs (Claude, GPT, Ollama) to automatically translate i18n localization files. #opensource

FreeFree tier
Type
Open Source

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

Automates translation of localization files via GitHub Actions
Uses LLM providers: Anthropic Claude, OpenAI, Ollama, AWS Bedrock
Translates only changed strings using content hashing to save costs
Supports XLIFF 1.2 and 2.0 with full inline element preservation
Supports JSON flat and nested formats, auto-detected
CLDR-aware ICU MessageFormat handling for 20+ languages
Runs on push, commit, or schedule triggers
Drop-in replacement for Lokalise, Phrase, and Crowdin

Pros & Cons

Pros
  • 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
Cons
  • 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

Best For

Automating translation updates in CI/CD pipelinesKeeping localization files in sync with source code changesReducing manual effort for multi-language app developmentAdding translations quickly to open-source or private projectsReplacing paid translation services with self-hosted LLM workflows

FAQ

What LLM providers does ai-i18n support?
It supports Anthropic Claude, OpenAI, Ollama (self-hosted), and AWS Bedrock (model-agnostic, works with Claude, Llama, Amazon Nova/Titan, Mistral, Cohere, etc.).
What file formats are supported?
XLIFF 1.2 and 2.0 (.xliff, .xlf) with full inline element preservation, and JSON (flat and nested). Format is auto-detected, but can be overridden.
Is ai-i18n free to use?
Yes, the GitHub Action itself is open source and free. However, you may incur costs from the LLM provider for API usage.
How does ai-i18n avoid re-translating unchanged strings?
It uses content hashing to track what has changed. Only new or modified strings are sent to the LLM API, saving time and money.
Can ai-i18n replace Lokalise or Crowdin?
The project explicitly markets itself as a drop-in replacement for Lokalise, Phrase, and Crowdin by automating translations directly in your GitHub workflow.