XLIFF
Overview
XLIFF (XML Localisation Interchange File Format) provides a standard markup language for extracted localizable text. It is maintained by the XLIFF Technical Committee at OASIS. The version 1.2 specification and can be found here: http://docs.oasis-open.org/xliff/xliff-core/xliff-core.html.
An XLIFF document is composed of one or more <file>
elements. Each <file>
element corresponds to an original file or source (i.e. database table). A <file>
contains the source of the localizable data and, once translated, the corresponding localized data for one, and only one, locale.
Localizable data are stored in <trans-unit>
elements. The <trans-unit>
element holds a <source>
element to store the source text, and a <target>
element to store the latest translated text. The <target>
elements are not mandatory, and it can hold a copy of the original source text if needed at the beginning of the process.
<trans-unit id="1"> <source xml:lang="en">Cannot find the file.</source> <target xml:lang="fr">Fichier non trouvé.</target> </trans-unit>
Any translations of the <source>
text that is not the latest (i.e. before proof, before edit, etc.), as well as possible proposed translations provided at some point during the localization process, can be stored in an unlimited number of <alt-trans>
elements. The different versions of the translations can be linked to a specific phase of the process by the phase-name
attribute. The details on the different phases can be stored in the <phase>
elements, grouped in the <phase-group>
element of the <header>
(one per <file>
element). If needed the <alt-trans>
element can have also a corresponding <source>
(i.e. for fuzzy matches).
The example below shows an XLIFF document storing text extracted from a Photoshop file (PSD file) and its translation in Japanese:
<xliff version="1.2"> <file original="Graphic Example.psd" source-language="en-US" target-language="ja-JP" 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@xyzcorp.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> <target xml:lang="ja-JP">Quetzal</target> </trans-unit> <trans-unit id="3" maxbytes="114"> <source xml:lang="en-US">An application to manipulate and process XLIFF documents</source> <target xml:lang="ja-JP">XLIFF 文書を編集、または処理 するアプリケーションです。</target> </trans-unit> <trans-unit id="4" maxbytes="36"> <source xml:lang="en-US">XLIFF Data Manager</source> <target xml:lang="ja-JP">XLIFF データ・マネージャ</target> </trans-unit> </body> </file> </xliff>
Useful Resources
- The XLIFF TC mailing list at OASIS: http://lists.oasis-open.org/archives/xliff (public archives, only TC members can post)
- The XLIFF Users mailing list at OASIS: http://lists.oasis-open.org/archives/xliff-users (public archives, registered users can post)
- The XLIFF Comments mailing list at OASIS: http://lists.oasis-open.org/archives/xliff-comment (public archives, registered users can post)
- XLIFFChecker, a validation tool for XLIFF 1.x documents.
- Mapping between ITS 2.0 and XLIFF 1.2: http://www.w3.org/International/its/wiki/XLIFF_1.2_Mapping
Version 2.0
The version 2.0 of XLIFF is the latest standard version of XLIFF
Some useful links:
- The latest published specification for XLIFF 2 is here: http://docs.oasis-open.org/xliff/xliff-core/v2.0/xliff-core-v2.0.html
- The wiki main page: http://wiki.oasis-open.org/xliff/
- The Okapi XLIFF Toolkit is here: https://bitbucket.org/okapiframework/xliff-toolkit
- A online validation tool for XLIFF 2: http://okapi-lynx.appspot.com/validation
XLIFF in the Okapi Framework
The Okapi Framework use XLIFF in many places. For example:
- The XLIFF Filter processes XLIFF input as any other bilingual input.
- Tikal and Rainbow can both produce XLIFF translation packages.
- Some steps, like the XLIFF Splitter Step, the XLIFF Joiner Step, or the Rainbow Translation Kit Creation Step, are designed to work with XLIFF documents.
- For XLIFF 2.0, see the Okapi XLIFF Toolkit project.
- See also the summary page of the deliverables for the MultilingualWeb-LT project.