Skip to main content
XLIFF exchanges source and target text between localization tools. Hyperlocalise reads supported XLIFF 1.2 and 2.x structures. Include target elements if you need to preserve source text during writeback. Supported extensions: .xlf, .xlif, .xliff.

Source file

Save this example as locales/en-US/messages.xlf.

Configure your files

Use this i18n.yml for the example, or add its file mapping to your existing bucket. See path templates for other layouts.

Translate

Install the CLI and set OPENAI_API_KEY in your project’s .env.local or shell. You can also configure another AI provider.
The dry run previews the work. The second command writes translations to the configured target path and updates the lockfile.

Behavior and limitations

  • Supports XLIFF 1.2 trans-unit and 2.x unit elements. Keys prefer id, then name, then resname.
  • 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