.XLIFF XML Localization Interchange File Format
.xliff

XML Localization Interchange File Format

XLIFF (OASIS, 2002) is the XML interchange standard that lets SDL Trados, memoQ, Crowdin, and 50+ translation tools exchange source text and translations without data loss. Each segment pairs source and target with translator notes and state tracking.

File structure
Header schema
Records structured data
Text2002
By FileDex
Not convertible

XLIFF requires specialized localization tools for conversion. FileDex displays format information and CLI reference.

Common questions

What is an XLIFF file and what is it used for?

XLIFF is an OASIS XML standard for exchanging translatable text between content management systems and translation tools. Each file contains source text segments paired with translations, translator notes, and progress states. Used by SDL Trados, memoQ, Crowdin, Xcode, and 50+ localization platforms.

What is the difference between XLIFF 1.2 and XLIFF 2.0?

XLIFF 2.0 simplified the core schema and moved advanced features into optional modules. The unit/segment hierarchy replaced 1.2's trans-unit model. Inline code handling uses <pc> and <ph> instead of <g> and <x/>. Most CAT tools support both versions, but new projects should target 2.0.

How do I open and edit an XLIFF file?

Professional CAT tools like SDL Trados, memoQ, or OmegaT provide the best editing experience with translation memory and terminology support. For inspection, any text editor (VS Code, Notepad++) reads XLIFF as plain XML. Online platforms like Crowdin and Transifex import XLIFF directly.

What is the difference between XLIFF and TMX?

XLIFF carries work-in-progress translations for a specific project — source segments, target translations, translator notes, and states. TMX stores translation memory — accumulated pairs of source and target text for reuse across projects. XLIFF is the project file; TMX is the knowledge base.

What makes .XLIFF special

OASIS standard since 2002
50+ tools speak the same language
Before XLIFF, every CAT tool used proprietary formats. OASIS XLIFF created a universal interchange — SDL Trados, memoQ, Crowdin, and Xcode all read and write the same XML.
Apple's localization pipe
Xcode exports and imports XLIFF
iOS and macOS app localization flows through XLIFF. Developers export strings from Xcode, translators work in any CAT tool, and the translated XLIFF imports back into the project.
Plain XML
Human-readable, no binary parts
An XLIFF file is plain text XML. Open it in VS Code and you see source text, translations, translator notes, and state tracking — no proprietary encoding or binary data.
Inline code preservation
<pc> and <ph> protect formatting
HTML tags become abstract <pc> elements in XLIFF. Translators reorder them for the target language without touching raw markup. The tool reconstructs formatting on export.

Every multilingual product — iOS apps, Android apps, SaaS platforms, government websites — needs a way to send text to translators and get translations back. XLIFF is the pipe that connects content systems to translation tools.

Continue reading — full technical deep dive

The Core Data Model

An XLIFF 2.0 file wraps one or more <file> elements, each representing a source document. Inside each file, <unit> elements represent translatable items. Each unit contains one or more <segment> elements with <source> (original text) and <target> (translation). A segment may carry a state attribute: initial, translated, reviewed, or final.

This three-level hierarchy (file → unit → segment) maps naturally to localization workflows. A paragraph of HTML becomes a unit. Each sentence becomes a segment. Inline formatting (<b>, <a href>) is preserved as <pc> (paired code) or <ph> (placeholder) elements so translators see text, not markup.

Inline Codes and Formatting

The hardest problem in translation interchange is preserving formatting without exposing raw HTML or XML to translators. XLIFF 2.0 uses:

  • <pc> — paired inline codes (like <b>bold</b><pc id="1">bold</pc>)
  • <ph> — standalone placeholders (like {username}<ph id="2"/>)
  • <sc>/<ec> — spanning codes for complex markup

Translators move these elements within the target text to match the target language's word order.

Version History

XLIFF 1.0 (2002) — first OASIS Committee Specification. Broad adoption began. XLIFF 1.2 (2008) — the most widely deployed version. Added group elements, alt-trans for translation memory matches, tool-specific extensions. XLIFF 2.0 (2014) — OASIS Standard. Simplified core schema, moved features to optional modules (translation candidates, glossary, metadata, validation, size restriction, change tracking). XLIFF 2.1 (2018) — added ITS (Internationalization Tag Set) module and alignment module.

Apple's XLIFF Workflow

Xcode uses XLIFF as its localization interchange format. Developers export an XLIFF file containing all localizable strings from .strings, .storyboard, and .xib files. Translators work on the XLIFF in any CAT tool. Developers import the translated XLIFF back into Xcode. This workflow handles pluralization rules, adaptive strings, and Info.plist localization.

Arabic Localization Industry

The Arabic localization market serves Saudi Vision 2030 initiatives — government apps, e-commerce platforms, and fintech products all require Arabic localization. XLIFF is the standard interchange format. Key challenges: right-to-left text direction encoded in XLIFF inline codes, Arabic morphological complexity requiring context for accurate translation, and the need for Saudi Arabic (not Egyptian or Levantine) variants in government applications.

XLIFF vs Alternatives

TMX (Translation Memory eXchange) stores translation memory databases — pairs of source and target for reuse. XLIFF carries work-in-progress translations. They complement each other: XLIFF for the current project, TMX for the accumulated memory.

JSON-based i18n (like i18next, react-intl) is simpler for web developers but lacks translator context (notes, states, inline code handling). XLIFF is the professional interchange format; JSON is the runtime format.

.XLIFF compared to alternatives

.XLIFF compared to alternative formats
Formats Criteria Winner
.XLIFF vs .TMX
Purpose
XLIFF carries work-in-progress translations for a project. TMX stores translation memory for reuse across projects. They serve complementary roles — XLIFF is the project file, TMX is the knowledge base.
Draw
.XLIFF vs .JSON I18N
Translator workflow
XLIFF carries translator notes, state tracking, and inline code handling that JSON i18n files lack. JSON is simpler for developers but insufficient for professional translation workflows with review cycles.
XLIFF wins
.XLIFF vs .PO/GETTEXT
Ecosystem breadth
XLIFF is tool-agnostic — 50+ CAT tools support it. PO files are tied to GNU Gettext and primarily used in open-source software. XLIFF covers web, mobile, desktop, and enterprise localization.
XLIFF wins

Technical reference

MIME Type
application/xliff+xml
Developer
OASIS
Year Introduced
2002
Open Standard
Yes — View specification

Binary Structure

XLIFF is plain XML text. The file begins with an XML declaration (<?xml version="1.0" encoding="UTF-8"?>) followed by the <xliff> root element with namespace and version attributes. Inside: <file> elements containing <unit> elements, each with <segment> holding <source> and <target> text. No binary components — entirely human-readable.

2002OASIS publishes XLIFF 1.0 as an XML-based standard for exchanging localization data between tools2007XLIFF 1.2 released — adds support for alt-trans elements and becomes the most widely adopted version2014XLIFF 2.0 (OASIS Standard) published with simplified core and modular extensions architecture2021XLIFF 2.1 released as an OASIS Standard, adding change tracking and metadata modules
Validate XLIFF XML structure other
xmllint --noout --schema xliff-core-2.0.xsd translation.xliff

Validates the XLIFF file against the official XSD schema. Reports structural errors — missing required elements, invalid attributes, malformed XML.

Count translatable segments in an XLIFF file other
grep -c '<segment' translation.xliff

Counts the number of <segment> elements — each represents one translatable text unit. Useful for estimating translation workload.

LOW

Attack Vectors

  • XML External Entity (XXE) injection

Mitigation: XLIFF is plain text XML with no embedded executables. The primary risk is XXE injection in server-side parsers. Disable DTD/external entity resolution when processing untrusted XLIFF files.