XLIFF Localization

Localtransformer is able to localize XLIFF (.xlf) files. XLIFF stands for XML Localisation Interchange File Format and is a format developed by a group of localization customers, localization suppliers, and tools vendors, including: Oracle, Novell, IBM/Lotus, Sun MicroSystems, Alchemy Software and others. XLIFF is a format to store extracted text and carry the data from one step to another in the localization process.

XLIFF is an XML application, as such it begins with an XML declaration. After the XML declaration comes the XLIFF document itself, enclosed within the <xliff> element. An XLIFF document is composed of one or more sections, each enclosed within a <file> element. The <file> element consists of a <header> element, which contains metadata about the <file>, and a <body> element, which contains the extracted translatable data from the <file>. The translatable data within <trans-unit> elements is organized into <source> and <target> paired elements. These <trans-unit> elements can be grouped recursively in <group> elements.

Localtransformer extracts the text of the <source> elements and when it builds the localized file it adds the corresponding <target> elements with the translated text. Moreover, it sets the value of the attribute "source-language" of the <file> element to the source language iso code and the value of the "target-language" attribute of the same element to the translated language iso code.

For example, if an original XLIFF file has the following contents:

<? xml version="1.0" ?>
<xliff version="1.0">
<file original="index.html" source-language="en" >
<header>
<skl>
<external-file href="index.skl"/>
</skl>
</header>
<body>
<trans-unit id="_1_index_1">
<source>Catalog of Mobile Phones</source>
</trans-unit>
<trans-unit id="_1_index_2">
<source>Latest mobile phones</source>
</trans-unit>
</body>
</file>
</xliff>


Then the localized in German XLIFF file will have the following contents :

<? xml version="1.0" ?>
<xliff version="1.0">
<file original="index.html" source-language="en" target-language="de" >
<header>
<skl>
<external-file href="index.skl"/>
</skl>
</header>
<body>
<trans-unit id="_1_index_1">
<source>Catalog of Mobile Phones</source>
<target>Handy Katalog</target>
</trans-unit>
<trans-unit id="_1_index_2">
<source>Latest mobile phones</source>
<target>Die neusten Handys</target>
</trans-unit>
</body>
</file>
</xliff>


As you can see above, <target> elements with the translated text have been added and also the "source-language" and "target-language" attribute values have been properly set.

For more information on XLIFF consult the following websites :

http://www.xliff.org
http://www.oasis-open.org/committees/xliff/documents/xliff-specification.htm
http://xml.coverpages.org/xliff.html