Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

XLIFF with multiple target languages?

We would like to use the XLIFF format as base for translating certain texts from German into French and Italian. (The translations will be performed with SDL Trados.)

From the specification, there seems to be precisely one target language per XLIFF file, but additionally there can be specified further "alternate languages". Specifying two target languages would therefore be possible from the spec:

<xliff xmlns="urn:oasis:names:tc:xliff:document:1.2" version="1.2">
  <file source-language="de" target-language="it">
    <body>
      <trans-unit id="hi">
        <source>Betrieb</source>
        <target>Divisione</target>
        <alt-trans>
          <target xml:lang="fr">Site</target>
        </alt-trans>
      </trans-unit>
    </body>
  </file>
</xliff>

Is this using XLIFF in the expected sense? Or would it be better to produce two documents, one with target language fr and another one with target language it? (I don't like the repetition)

like image 333
rplantiko Avatar asked Dec 15 '22 14:12

rplantiko


2 Answers

<alt-trans> is not intended for having <target>s in more than one language in each trans-unit; it's rather intended for translation match be it translation memory, machine translation matches, or simple an outdated target string which needs to be updated according to most recent changes in the source string. Having said that, in some cases <alt-trans> is perceived as a workaround for translating what the industry calls "adaptive languages" (French for Canada is often adapted from French translation) without having separate files. As a localization practitioner who has to deal with Xliffs from various sources and presented in various schemas, I recommend to avoid this hack. It is more common and accepted to use the <file> tag to embed trans-units for multiple languages in one Xliff file:

<?xml version="1.0" encoding="utf-8" ?>
<xliff version="1.1" xml:lang='en'>
 <file source-language='en' target-language='de' datatype="plaintext" original="Sample.po">
  ...
   <body>
    <trans-unit id="1" restype="button" resname="IDC_TITLE">
     <source>Title</source>
    </trans-unit>
    <trans-unit id="2" restype="label" resname="IDC_STATIC">
     <source>&amp;Path:</source>
    </trans-unit>
  ...
 </file>
 <file source-language='en' target-language='fr' datatype="plaintext" original="Sample.po">
    <trans-unit id="1" restype="button" resname="IDC_TITLE">
  ...
   </body>
 </file>
</xliff>
like image 66
Shervin Avatar answered Feb 04 '23 11:02

Shervin


I work for a translation agency. I have not seen multilingual xliff files yet. So to make your and your agency's life easier, I would build individual files. Also other tools like e.g. CenShare create individual files.

And it makes it easier to hand it over to different translators.

like image 45
Remy Avatar answered Feb 04 '23 11:02

Remy