XLIFF (XML Localisation Interchange File Format) is an XML-based format created to standardize the way localizable data is passed between tools during a localization process and is a common format for translation.

Besides the usage in traditional translation tools, XLIFF is used more often in the field of software translation. Several tools like Xcode or Multilingual app toolkit allow you to export and import XLIFF files as alternative to the more proprietary resource file formats.

The most important reason to use XLIFF, is that you can use a single file format when translating different kinds of documents.

Text United supports both XLIFF and XLIFF which includes HTML code (XLIFF + HTML). 

  • To have a compatible XLIFF file, you will have to make sure that your file complies with the XLIFF 1.2 specification in order to be processed correctly.
  • XLIFF 1.2 should have the ID attribute, otherwise the file cannot be processed correctly by Text United. The ID attribute is required for XLIFF 1.2 in the official specification.
  • The ID attribute must contain an appropriate numeric value
  • If your file contains embedded parts with programming code make sure to maintain the formatting accurately as shown in the source segments.
  • Content within CDATA elements will be considered as translatable text by the system.
  • Line breaks in CDATA elements will be preserved in the translated file.
  • Make sure to generate XLIFF or XLF files that have the correct language combination defined.
  • Placeholders will be removed from the xliff file, making the file easier to translate.
  • If a placeholder is at the beginning or the end of a segment it will be removed. If it’s in the middle of the segment, then it won’t be removed from the text. In that case translator may place it anywhere according to the order of words in the translation.
  • The placeholders will be restored in the translated output file.
  • Content from <Note> elements will not be extracted

Example of an XLIFF 1.2 untranslated file:

<xliff version="1.2">
 <file original="Graphic Example.psd"
  source-language="en-US"
  tool="Rainbow" datatype="photoshop">
  <header>
   <skl>
    <external-file uid="3BB236513BB24732" href="Graphic Example.psd.skl"/>
   </skl>
   <phase-group>
    <phase phase-name="extract" process-name="extraction"
     tool="Rainbow" date="20010926T152258Z"
     company-name="NeverLand Inc." job-id="123"
     contact-name="Peter Pan" contact-email="ppan@example.com">
     <note>Make sure to use the glossary I sent you yesterday.
      Thanks.</note>
    </phase>
   </phase-group>
  </header>
  <body>
   <trans-unit id="1" maxbytes="14">
    <source xml:lang="en-US">Quetzal</source>
   </trans-unit>
   <trans-unit id="3" maxbytes="114">
    <source xml:lang="en-US">An application to manipulate and
     process XLIFF documents</source>
   </trans-unit>
   <trans-unit id="4" maxbytes="36">
    <source xml:lang="en-US">XLIFF Data Manager</source>
   </trans-unit>
  </body>
 </file>
</xliff>

Example of an XLIFF 1.2 translated file by Text United:
xxx - represents translated content

<?xml version="1.0" encoding="UTF-8"?>
<xliff version="1.2">
 <file original="Graphic Example.psd" source-language="en-US" tool="Rainbow" datatype="photoshop" target-language="de-AT">
  <header>
   <skl>
    <external-file uid="3BB236513BB24732" href="Graphic Example.psd.skl"></external-file>
   </skl><phase-group><phase phase-name="extract" process-name="extraction"></phase></phase-group><note>Make sure to use the glossary I sent you yesterday.
      Thanks.</note>
   
  </header>
  <body>
   <trans-unit id="1" maxbytes="14" approved="yes">
    <source xml:lang="en-US">Quetzal</source>
   <target xml:lang="de-AT">XXXXXXX</target>
</trans-unit>
   <trans-unit id="3" maxbytes="114" approved="yes">
    <source xml:lang="en-US">An application to manipulate and
     process XLIFF documents</source>
   <target xml:lang="de-AT">XX XXXXXXXXXXX XX XXXXXXXXXX XXX XXXXXXXXX XXXXX XXXXXXXXX</target>
</trans-unit>
   <trans-unit id="4" maxbytes="36" approved="yes">
    <source xml:lang="en-US">XLIFF Data Manager</source>
   <target xml:lang="de-AT">XXXXX XXXX XXXXXXX</target>
</trans-unit>
  </body>
 </file>
</xliff>

Localizing your App

https://developer.apple.com/library/content/documentation/MacOSX/Conceptual/BPInternational/LocalizingYourApp/LocalizingYourApp.html

Did this answer your question?