Skip to main content

XML format

XLIFF

The localisation interchange format that carries source text, translations and their state.

XLIFF pairs each <source> with a <target> inside a <trans-unit>, along with a state attribute recording how far the translation has got. It is the handover format between content systems and translation vendors.

Version 1.2 remains far more widely implemented than 2.x, and the two are different enough — different namespace, restructured file element — that tools generally support one or the other.

Constraints that bite

  • XLIFF 1.2 and 2.x are not interchangeable; check the namespace and version.
  • Inline placeholders (<g>, <x>, <ph>) must survive translation intact or the output breaks.
  • Round-tripping is the point: preserve unknown elements rather than dropping them.
  • The state attribute, not the presence of a target, is what tells you a unit is done.
Root element
<xliff>
Media type
application/xliff+xml
Extensions
.xlf, .xliff
Namespaces
  • urn:oasis:names:tc:xliff:document:1.2
XMLDir label
xml

A minimal valid document

Every example on this site is checked against the same parser the workspace uses, so what you see below is known to be well-formed.

xliff.xml
<?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="greeting">
        <source>Hello</source>
        <target state="translated">Hallo</target>
      </trans-unit>
    </body>
  </file>
</xliff>

Get started

Bring order to the XML your team can't afford to ignore.

Create a free account and get a private workspace to search, validate, diff, and monitor your XML feeds, sitemaps, schemas, and vendor integrations.