![]() |
opentag.com a place for localization tools and technologies |
| \\ Technologies :: Formats :: XLIFF | ||
|
A few frequently asked questions:
Purpose of XLIFFXLIFF is a format to store extracted text and carry the data from one step to another in the localization process. It follows the same principles as OpenTag, and borrows also a few ideas from TMX. For example, to specify in-line codes XLIFF supports both the placeholder OpenTag's method and TMX's encapsulation system. Different Components of an XLIFF DocumentFor detailed information see the XLIFF specification. An XLIFF document is composed of one or more Localizable data are stored in <trans-unit id="1"> <source xml:lang="en">Cannot find the file.</source> <target xml:lang="ja">Cannot find the file.</target> </trans-unit> Any translations of the For example: <phase-group> <phase phase-name="p0" process-name="Preprocessing"/> <phase phase-name="p1" process-name="Translation"/> <phase phase-name="p2" process-name="Edit" contact-name"Pierre"> <note>The quality was good overall, but it seems that the TM used to preprocess the file had many typos. Some got carried into the translation.</note> </phase> </phase-group> ... <trans-unit> <source xml:lang="en">Cannot find the file.</source> <target xml:lang="fr-FR">Fichier non trouvé.</target> <alt-trans> <target xml:lang="fr-FR" phase-name="p1" >Fichier pas trouvé.</target> <alt-trans> <alt-trans quality-match="76"> <source xml:lang="en">Folder not found.</source> <target xml:lang="fr-FR" phase-name="p0" >Dossier pas trouvé.</target> <alt-trans> </trans-unit> An XLIFF Each As you see XLIFF provides a rich semantic and can be used in many different ways, but still provide a consistent structure that is conducive to interoperability between tools. Examples of XLIFF DocumentsExample 1: Text extracted from a Photoshop file (PSD file) and its translation in Japanese: <?xml version="1.0"?>
<xliff version="1.1">
<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>
Example 2: A simple XLIFF file with strings extracted from a Windows RC file. Here the skeleton (the data needed to reconstruct the original file are) is stored in a separate file: <?xml version="1.0" encoding="windows-1252" ?>
<xliff version="1.1" xml:lang='en'>
<file source-language='en' target-language='fr' datatype="winres"
original="Sample1.rc">
<header>
<skl><external-file href="Sample1.rc.skl"/></skl>
</header>
<body>
<group restype="dialog" resname="IDD_DIALOG1">
<trans-unit id="1" restype="caption">
<source>Title</source>
</trans-unit>
<trans-unit id="2" restype="label" resname="IDC_STATIC">
<source>&Path:</source>
</trans-unit>
<trans-unit id="3" restype="check" resname="IDC_CHECK1">
<source>&Validate</source>
</trans-unit>
<trans-unit id="4" restype="button" resname="IDOK">
<source>OK</source>
</trans-unit>
<trans-unit id="5" restype="button" resname="IDCANCEL">
<source>Cancel</source>
</trans-unit>
</group>
</body>
</file>
</xliff>
Example 3: The same RC data as in example 2, this time with the skeleton embedded inside the XLIFF document, as a CDATA section (text in red): <?xml version="1.0" encoding="windows-1252" ?>
<xliff version="1.1" xml:lang='en'>
<file source-language='en' target-language='fr' datatype="winres"
original="Sample1.rc">
<header>
<skl>
<internal-file crc="64a2b9b0"><![CDATA[
<OKFSKL100:RES:964008261>
#include "resource.h"
IDD_DIALOG1 DIALOG DISCARDABLE 0, 0, 186, 57
STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU
CAPTION "<xref$1>"
FONT 8, "MS Sans Serif"
BEGIN
LTEXT "<xref$2>",IDC_STATIC,8,4,18,8
EDITTEXT IDC_EDIT1,8,16,100,14,ES_AUTOHSCROLL
CONTROL "<xref$3>",IDC_CHECK1,"Button",
BS_AUTOCHECKBOX | WS_GROUP |
WS_TABSTOP,8,40,41,10
DEFPUSHBUTTON "<xref$4>",IDOK,129,7,50,14,WS_GROUP
PUSHBUTTON "<xref$5>",IDCANCEL,129,24,50,14
END]]></internal-file>
</skl>
</header>
<body>
<group restype="dialog" resname="IDD_DIALOG1">
<trans-unit id="1" restype="caption">
<source>Title</source>
</trans-unit>
<trans-unit id="2" restype="label" resname="IDC_STATIC">
<source>&Path:</source>
</trans-unit>
<trans-unit id="3" restype="check" resname="IDC_CHECK1">
<source>&Validate</source>
</trans-unit>
<trans-unit id="4" restype="button" resname="IDOK">
<source>OK</source>
</trans-unit>
<trans-unit id="5" restype="button" resname="IDCANCEL">
<source>Cancel</source>
</trans-unit>
</group>
</body>
</file>
</xliff>
Example 4: The same RC data as in example 2, this time with the skeleton embedded inside the XLIFF document and coded in base64 format (text in red): <?xml version="1.0" encoding="windows-1252" ?>
<xliff version="1.1" xml:lang='en'>
<file source-language='en' target-language='fr' datatype="winres"
original="Sample1.rc">
<header>
<skl>
<internal-file crc="d341e458" form="base64>
PE9LRlNLTDEwMDpSRVM6OTY0MDA4MjYxPg0KI2luY2x1ZGUgInJlc291cmNlLmgiDQpJRERf
RElBTE9HMSBESUFMT0cgRElTQ0FSREFCTEUgIDAsIDAsIDE4NiwgNTcNClNUWUxFIERTX01P
REFMRlJBTUUgfCBXU19QT1BVUCB8IFdTX0NBUFRJT04gfCBXU19TWVNNRU5VDQpDQVBUSU9O
ICI8eHJlZiQxPiINCkZPTlQgOCwgIk1TIFNhbnMgU2VyaWYiDQpCRUdJTg0KICAgIExURVhU
ICAgICAgICAgICAiPHhyZWYkMj4iLElEQ19TVEFUSUMsOCw0LDE4LDgNCiAgICBFRElUVEVY
VCAgICAgICAgSURDX0VESVQxLDgsMTYsMTAwLDE0LEVTX0FVVE9IU0NST0xMDQogICAgQ09O
VFJPTCAgICAgICAgICI8eHJlZiQzPiIsSURDX0NIRUNLMSwiQnV0dG9uIiwNCiAgICAgICAg
ICAgICAgICAgICAgQlNfQVVUT0NIRUNLQk9YIHwgV1NfR1JPVVAgfCANCiAgICAgICAgICAg
ICAgICAgICAgV1NfVEFCU1RPUCw4LDQwLDQxLDEwDQogICAgREVGUFVTSEJVVFRPTiAgICI8
eHJlZiQ0PiIsSURPSywxMjksNyw1MCwxNCxXU19HUk9VUA0KICAgIFBVU0hCVVRUT04gICAg
ICAiPHhyZWYkNT4iLElEQ0FOQ0VMLDEyOSwyNCw1MCwxNA0KRU5EDQo=
</internal-file>
</skl>
</header>
<body>
<group restype="dialog" resname="IDD_DIALOG1">
<trans-unit id="1" restype="caption">
<source>Title</source>
</trans-unit>
<trans-unit id="2" restype="label" resname="IDC_STATIC">
<source>&Path:</source>
</trans-unit>
<trans-unit id="3" restype="check" resname="IDC_CHECK1">
<source>&Validate</source>
</trans-unit>
<trans-unit id="4" restype="button" resname="IDOK">
<source>OK</source>
</trans-unit>
<trans-unit id="5" restype="button" resname="IDCANCEL">
<source>Cancel</source>
</trans-unit>
</group>
</body>
</file>
</xliff>
More InformationThe XLIFF Pages at OASIS Latest XLIFF Specification "Indroduction to XLIFF" PowerPoint Presentation and samples
files The DTD for XLIFF 1.1 Public archives of the XLIFF TC mailing list (posting reserved to the
TC members) Public archives of the XLIFF-Comments mailing list (posting opened to
anyone) XLIFF page on the XML Cover's Pages Article on XLIFF by Milan from Moravia-IT Tools and Resources for XLIFFSettings files to use XLIFF documents with some of the XML-enabled commercial translation tools. ENLASO Localization Tools, provides XLIFF filters for various formats. XLIFF Translation Editor by Heartsome, to edit XLIFF documents. What are the differences between XLIFF and OpenTag?Both formats have the same general goal: storing extracted text for localization purpose. However, there are many differences:
Overall you can see XLIFF as the "next version" of OpenTag. Some tools still use OpenTag and that is perfectly fine. Both formats can usually be easily mapped to each other. If you start the development of a tool and plan on using one of the two formats, use XLIFF. What are the differences between XLIFF and TMX?TMX is a format to exchange translation memory data from one tool to another. Its purpose is therefore different from XLIFF's. Both formats have a lot in common, especially regarding the inline markup elements.
Is XLIFF meant to be a container for TMX, TBX, OpenTag, etc. files?No. An XLIFF document is meant to contain data extracted from an
original source (file, database, etc.). It may have references to TMX or
TBX or other files. There is even a mechanism (the Can XLIFF be used as a resource format?Probably. If the data you need are simple (e.g. identifier/string pairs), XLIFF can probably be used as source format for your application. However, keep in mind that XLIFF has never been designed for such purpose. Its intent is not to be a common resource format, but a storage format for extracted during the localization process. Why XLIFF is only bilingual and not multilingual?XLIFF is bilingual (each translation unit offers a There are not significant advantages (and actually many drawbacks) in having a file containing all languages together during localization. At some point you will have to split such file into source and one target since it has to be translated by different translators. There are however ways to have multilingual XLIFF documents, if you really want to:
|
||