Translate XLIFF 1.2 files
XLIFF puts the source and the translation side by side, with inline tags in between. Move or drop one tag and the placeholder or link in the app is gone. KAERIS keeps the tags and tells you if one is missing.
How an XLIFF 1.2 file is built
Each <trans-unit> holds a <source> and a <target>. Inside the text, <x/>, <g> and <ph> stand for variables and markup. Angular's messages.xlf is this format.
<?xml version="1.0" encoding="UTF-8"?>
<xliff version="1.2" xmlns="urn:oasis:names:tc:xliff:document:1.2">
<file source-language="en" target-language="de" datatype="plaintext" original="app">
<body>
<trans-unit id="welcome">
<source>Welcome back, <x id="1" ctype="x-name"/>!</source>
</trans-unit>
<trans-unit id="terms">
<source>I accept the <g id="2" ctype="x-link">terms</g>.</source>
</trans-unit>
</body>
</file>
</xliff>
What to watch for in XLIFF translations
Inline tags are the placeholders
<x id="1"/>is a variable,<g>…</g>wraps a link or an emphasis. They are kept as raw markup and compared with the source.One file, two languages
The
target-languageattribute and each<target>have to match. The check reads the catalog alone, so one file is enough.Version 1.2 only
XLIFF 2.0 has a different structure (
<unit><segment>). It is refused with a message instead of being half-read.Do not translate the tag attributes
The
ctypeandidattributes are structure, not text.
A real run: translated to German and checked
A real run, 27 October 2026, nothing edited by hand: kaeris translate messages.xlf --langs de with kaeris 0.2.35, 1.9 seconds, model google/gemini-2.5-flash-lite, the free-tier default. Below, the German file it wrote and what kaeris check says about it.
<?xml version="1.0" encoding="utf-8"?>
<xliff version="1.2" xmlns="urn:oasis:names:tc:xliff:document:1.2">
<file original="app" source-language="en" target-language="de" datatype="plaintext">
<body>
<trans-unit id="welcome">
<source>Welcome back, <x id="1" ctype="x-name" />!</source>
<target state="translated">Willkommen zurück, <x id="1" ctype="x-name" />!</target>
</trans-unit>
<trans-unit id="terms">
<source>I accept the <g id="2" ctype="x-link">terms</g>.</source>
<target state="translated">Ich akzeptiere die <g id="2" ctype="x-link">Nutzungsbedingungen</g>.</target>
</trans-unit>
</body>
</file>
</xliff>
$ kaeris check --source messages.xlf --langs de ✓ de: complete & placeholder-safe ✓ all locales complete & placeholder-safe
What KAERIS does with it
Tags kept
Inline tags are kept as raw XML and a missing one is reported by the free check.
States written
Each translated
<target>is written withstate="translated".Free check for this format
The free check on /check reads this format and runs without a key or an account. The terminal command
kaeris checkreads it too: it takes all 13 formats since kaeris 0.2.35, with the same rules and nothing sent anywhere.
Run it in three steps
Install the CLI
Run
pip install kaeris.Translate the file
Run
kaeris translate src/locale/messages.xlf --langs de,ja.Check the result
Open the free check page and upload the translated file. A catalog with source and target in one file is checked alone.
pip install kaeris kaeris translate src/locale/messages.xlf --langs de,ja --verify
Questions
Is XLIFF 2.0 supported?
No. Version 1.2 is supported; a 2.0 file is refused with a message that says so.
Is it free?
Yes, without an account: 10,000 characters per file and up to 8 languages per run. A free API key raises the file limit to 50,000 characters. Lifetime is $79 once, on your own OpenRouter key; monthly plans start at $19. Pricing
Can I run it from the terminal or in CI?
Yes. pip install kaeris, then kaeris translate src/locale/messages.xlf --langs de,ja. See also Angular. The GitHub Action runs the same translation in a pull request. CLI docs · GitHub Action
Keep going
CLI reference · Check reference · Translate in the browser · Free check · Convert formats · Pseudo-localization
Other formats: JSON · YAML · .po · ARB · .strings · .xcstrings · .properties · .resx · CSV · Markdown · Fluent · Android XML
Framework guides: react-i18next · next-intl · vue-i18n · Flutter · iOS · Android