Translate XLIFF files with the file translation feature via the web translator, desktop apps, or API.
XLIFF is a bilingual file format that is often used in the translation industry and stands for XML Localization Interchange File Format. It is based on the markup language XML.
XLIFF files contain both the original source text as well as its translation.
These texts are stored in the elements called <source> and <target>. The <source> element contains the original source text, while the translation is stored in the <target> element.
Both elements are child elements of a parent element called <segment>.
After the translation, the target language ("trgLang") will be changed according to the selected target language in the translator.
Subscribers with an API plan can translate XLIFF files by using /document requests. Consult our API documentation to learn how to translate XLIFF files with the DeepL API.
About XLIFF file translation
- When translating XLIFF files with DeepL, all texts stored in <source> elements will be considered for the translation.
- All <source> elements with a state attribute value other than initial or empty elements will be ignored for the translation.
- The translations will be placed in a <target> element and will be part of the same parent element <segment> as the respective <source> element. The translated file will contain the original source text and the translations.
- Units marked with the translate="no" attribute will be excluded from translation.
If you choose another target language for XLIFF translation on DeepL than defined in the source XLIFF file, segments will be translated irrespective of their state attribute value. Also, the trgLang attribute in the translated XLIFF file will be updated accordingly.
About additional modules in XLIFF
XLIFF is commonly used as a project or exchange file format for localization projects. However, DeepL treats XLIFF files as a multilingual text file and as not a project file.
For file translations, DeepL extracts the texts from a <source> element of a XLIFF 2.1 file and enters the translation in a new <target> element.
Notes, metadata and other modules that are used to provide linguistic resources to the translations will not be taken into consideration for the translation.
DeepL does only apply DeepL-native customization assets (e.g., glossary, style rules, translation memories) to file translations of XLIFF files. Assets that are included in the original XLIFF file will not be taken into account.
If you apply a glossary, style rule, translation memory or translation quality evaluation to a file translation, they will not be reflected in the translated XLIFF file via the respective modules.
Troubleshooting
My XLIFF file already contains partial translations. How can I preserve them?
DeepL overwrites every target element with its own translation, even if the target was previously filled in by a translator or by translation-memory matching. If you need to preserve existing translations, remove those trans-units before uploading or split the file into "needs translation" and "do not retranslate" subsets.
The state attribute didn't change after the translation.
The state attribute will not be changed during the translation (for example, to translated or final). You would need to update it manually.
I'm missing some elements of my XLIFF file after the translation.
For XLIFF version 2.0, comments and minor structural details might not be preserved after the translation. These include comments embedded between units, attribute ordering on inline elements and minor whitespace differences.
I added a termbase to my XLIFF file, but the terms are not used for the translation.
Glossaries, termbases, translation memories and other context files that are included in the original XLIFF 2.1 file will not be considered during file translation. Those assets would need to be uploaded and applied for the file translation via the DeepL user interface.