.xlf, .xlif, .xliff.
Source file
Save this example aslocales/en-US/messages.xlf.
Configure your files
Use thisi18n.yml for the example, or add its file mapping to your existing bucket.
See path templates for other layouts.
Translate
Install the CLI and setOPENAI_API_KEY in your
project’s .env.local or shell. You can also configure another
AI provider.
Behavior and limitations
-
Supports XLIFF 1.2
trans-unitand 2.xunitelements. Keys preferid, thenname, thenresname. - Parsing reads a non-empty target before falling back to source. Use source catalogs with empty targets for a first translation.
- Writeback updates existing targets and target-language metadata. If a unit has no target element, it replaces source text; include target elements to retain the source.
- Use one segment per XLIFF 2.x unit. Multiple segments in one unit are not independently translated and may receive the same combined value.
Next steps
- Check translations before committing generated files.
- Local translation workflow explains repeat runs.
- Browse all file formats.

