XLIFF Format Guide
Learn about the XLIFF format and how to prepare your files for translation
What is XLIFF?
XLIFF (XML Localization Interchange File Format) is an XML-based format designed to standardize the way localizable data are passed between tools during a localization process. It was created to provide a single interchange format that tool vendors, system integrators, and localization providers can use to exchange data.
Key Benefits
- • Standardization: Widely adopted industry standard
- • Interoperability: Works with most translation tools
- • Rich Metadata: Preserves context and formatting
- • Version Control: Easy to track changes
XLIFF Versions
XLIFF 1.2
The most widely supported version, used by many tools and platforms.
- • Stable and mature
- • Extensive tool support
- • Good for most use cases
- • Legacy compatibility
XLIFF 2.0
The modern standard with enhanced features and better structure.
- • Improved structure
- • Better metadata support
- • Enhanced validation
- • Future-proof
XLIFF Structure
Basic Structure
Key Elements
- <xliff> - Root element with version and language attributes
- <file> - Represents a source file being translated
- <unit> - Contains translatable content
- <segment> - Individual translation unit
- <source> - Original text to be translated
- <target> - Translated text (may be empty)
Common Attributes
- srcLang - Source language code (e.g., "en")
- trgLang - Target language code (e.g., "es")
- id - Unique identifier for elements
- original - Original filename
- state - Translation state (new, translated, reviewed)
Advanced Features
Comments and Notes
Add context and instructions for translators:
Placeholders and Variables
Handle dynamic content and formatting:
Translation States
Track the progress of translations:
initial
New segment, not yet translated
translated
Translation completed
reviewed
Translation reviewed and approved
Preparing Your XLIFF Files
1. Validate Your File
Ensure your XLIFF file is valid before uploading:
- • Check XML syntax with an XML validator
- • Verify XLIFF schema compliance
- • Ensure proper UTF-8 encoding
- • Test with XLIFF validation tools
2. Clean Up Content
Prepare your content for better translation results:
- • Remove HTML tags if not needed
- • Ensure consistent terminology
- • Add context notes where helpful
- • Check for placeholder text
3. Handle Existing Translations
Decide how to handle existing target content:
- • Clear target content for fresh translations
- • Keep existing translations for reference
- • Mark segments that need review
- • Preserve important metadata
Supported Formats
Primary Formats
- XLIFF 1.2 (.xlf, .xliff)
- XLIFF 2.0 (.xlf, .xliff)
- PO files (.po)
- JSON translation files (.json)
File Size Limits
- Web interface: 10MB max
- API: 50MB max
- Recommended: Under 5MB
Tools and Resources
XLIFF Editors
- • XLIFF Editor - Online XLIFF editor
- • Oxygen XML Editor - Professional XML editor
- • Visual Studio Code - With XML extension
- • Notepad++ - With XML plugin
- • SDL Trados Studio - Professional CAT tool
- • memoQ - Translation environment
Validation Tools
- • W3C XML Validator - Online XML validation
- • XML Schema Validator - Schema validation
- • Oxygen XML Validator - Professional validation
- • XML Validation - Online XML/XLIFF validation
Documentation & Resources
- • XLIFF 2.0 Specification - Official OASIS standard
- • XLIFF 1.2 Specification - Legacy standard
- • XML 1.0 Specification - W3C XML standard
- • Unicode Standard - Character encoding reference
Ready to Start?
Now that you understand XLIFF format, you're ready to begin translating: