i18n-actions/i18n Translate Action
Automatically translate i18n files using LLM providers (Anthropic, OpenAI, Ollama, AWS Bedrock)
View on GitHubTrust Signals
- Scorecard Score
- not yet scored
- Maintenance Recency
- Stale
- License
- None
Inputs
| name | description | required | default |
|---|---|---|---|
| provider | LLM provider to use (anthropic, openai, ollama, bedrock) | yes | anthropic |
| api-key | API key for the LLM provider (not required for Ollama or Bedrock) | no | — |
| model | Model to use for translation | no | "" |
| source-language | Source language code (e.g., en, en-US) | yes | en |
| target-languages | Comma-separated list of target language codes | yes | — |
| files | Glob pattern for translation files | yes | **/*.xliff |
| format | File format (xliff-1.2, xliff-2.0, json-flat, json-nested, auto) | no | auto |
| config-file | Path to configuration file | no | .i18n-translate.yml |
| commit | Whether to commit changes | no | true |
| commit-message | Commit message template | no | chore(i18n): update translations |
| batch-size | Number of strings to translate per API call | no | 10 |
| max-retries | Maximum number of retries for failed API calls | no | 3 |
| ollama-url | Ollama server URL (for ollama provider) | no | http://localhost:11434 |
| aws-region | AWS region for the bedrock provider (e.g., us-east-1) | no | "" |
| aws-access-key-id | AWS access key ID for the bedrock provider. Optional — falls back to the default AWS credential chain (e.g., aws-actions/configure-aws-credentials / OIDC) when omitted. | no | "" |
| aws-secret-access-key | AWS secret access key for the bedrock provider (paired with aws-access-key-id). | no | "" |
| aws-session-token | AWS session token for temporary credentials (bedrock provider). | no | "" |
| dry-run | Run without making actual changes | no | false |
| context | Additional context for translations | no | "" |
| glossary-file | Path to glossary YAML file for consistent terminology | no | "" |
Outputs
| name | description |
|---|---|
| translated-count | Number of strings translated |
| files-updated | Number of files updated |
| report | Translation report in markdown format |
| commit-sha | SHA of the commit (if committed) |