1.3 An XLIFF File

An XLIFF file uses the XML Localization Interchange File Format, which was designed by a group of software providers, localization service providers, and localization tools providers. XLIFF gives any software provider a single format that can be understood by any localization provider. XLIFF is loosely based on the OpenTag version 1.2 specification and also borrows from the TMX 1.2 specification. For more information, see the XLIFF Specification.

The following code is an example of an XLIFF file that was created using XMsgUtil. For the file element, the name of the tool attribute depends on and matches the name of the message tool you are using:

   <?xml version="1.0" encoding="utf-8"?>
   <!DOCTYPE xliff PUBLIC "-//XLIFF//DTD XLIFF//EN"
      "http://www.oasis-open.org/committees/xliff/documents/xliff.dtd">
   <xliff version="1.0">
      <file tool="XMsgUtil" ts="mdb" source-language="en" original="myProg.xlf"
         datatype="CString" category="NLM" product-name="My Program" 
         product-version="1.0">
      <header>
         <count-group name="MdbXliff">
            <count count-type="CString">2</count>
         </count-group>
      </header>
      <body>
         <group datatype="CString">
                                    <!-- maxbytes indicates length limit -->
            <trans-unit id="1" maxbytes="0" translate="yes">   
               <source>My Program, Version 1.0\n</source>
               <prop-group name="Dev">
                  <prop prop-type="Source file">myprog.c</prop>
                  <prop prop-type="Line number">28</prop>
                  <prop prop-type="Num params">0</prop>
                                <!-- Annotate with parameter description -->
                  <prop prop-type="Params notes"></prop>
                  <prop prop-type="Length preceded">no</prop>
                  <prop prop-type="Internal only">no</prop>
               </prop-group>
               <note from="Dev"></note>
            </trans-unit>
            <trans-unit id="2" maxbytes="0" translate="yes">
               <source>This is printed on the screen.\n</source>
               <prop-group name="Dev">
                  <prop prop-type="Source file">myprog.c</prop>
                  <prop prop-type="Line number">15</prop>
                  <prop prop-type="Num params">0</prop>
                  <prop prop-type="Params notes"></prop>
                  <prop prop-type="Length preceded">no</prop>
                  <prop prop-type="Internal only">no</prop>
               </prop-group>
               <note from="Dev"></note>
            </trans-unit>
         </group>
      </body>
      </file>
   </xliff>