XLIFF 1.2 / 2.0 localization with AI
XLIFF 1.2 and 2.0 bilingual files with source, target and notes.
.xlf.xliffformat: xliffevery locale in one file
What it is
XLIFF is the interchange format of the localization industry and Angular's i18n output. Each file pairs a source language with one target.
Example
src/locale/messages.xlf
<xliff version="1.2" xmlns="urn:oasis:names:tc:xliff:document:1.2"> <file source-language="en" target-language="es" datatype="plaintext" original="ng2.template"> <body> <trans-unit id="checkout.pay" datatype="html"> <source>Pay <x id="INTERPOLATION" equiv-text="{{ total }}"/></source> <target>Pagar <x id="INTERPOLATION" equiv-text="{{ total }}"/></target> <note priority="1" from="description">Primary button on checkout</note> </trans-unit> </body> </file></xliff>How Glossa handles it
- Plurals
- XLIFF has no plural structure of its own; ICU plural messages inside a unit are translated as one message with their structure kept.
- Comments and context
- <note> elements become context.
- Placeholders
- Inline elements (<x/>, <ph/>, <pc>) are treated as placeholders and must appear in every target.
- Round trip
- Both 1.2 and 2.0 are detected automatically. The unit key is resname when present, otherwise id; inline markup is kept as written.
Translate it from the command line
Push the source-language file; strings are deduplicated against the rest of your workspace and queued for translation. Pull writes src/locale/messages.xlf back in the same format.
npx @meterapp/glossa loginnpx @meterapp/glossa push src/locale/messages.xlf --project appnpx @meterapp/glossa pull --project app --locale es,de,jaOr ask an agent over MCP: “Push src/locale/messages.xlf to Glossa and pull Spanish.” It calls push_file and pull_file. See the CLI and MCP guides.
Other formats
Xcode String CatalogFlutter ARBJSON (key/value, i18next)YAML (Rails i18n)Apple .stringsApple .stringsdictAndroid strings.xmlGettext PO/POTJava .properties.NET RESXCSV / TSV (multi-locale)
Moving from Crowdin? Read the comparison.