Angular Xliff (xliff, xlf)
Angular applications use XLIFF (XML Localisation Interchange File Format) as their primary localisation exchange format, generated by the Angular CLI extract-i18n command. Angular supports both XLIFF 1.2 (the default) and XLIFF 2.0. XLIFF is an industry-standard XML format designed for translation exchange between content management systems and translation tools.
Angular XLIFF files contain trans-unit elements, each representing a translatable string. Each unit has a source element with the original text and a target element for the translated text. The id attribute is either a numeric hash generated by Angular or a custom identifier defined with the i18n attribute in templates. Notes and context for translators are stored in note elements within each unit.
Best practice: define meaningful custom IDs for your Angular i18n attributes rather than relying on auto-generated hash IDs — custom IDs are stable across template changes and make Translation Memory matching far more effective. Write context notes using the i18n attribute description syntax in templates — these appear as translator guidance in Language Monster. Run ng extract-i18n as part of your build process to keep XLIFF files in sync with your templates. Language Monster supports Angular XLIFF 1.2 and processes trans-unit elements while preserving Angular-specific XML structure.
