4

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)

Rachel Gallen
  • 27,943
  • 21
  • 72
  • 81
rplantiko
  • 2,698
  • 1
  • 22
  • 21

3 Answers3

7

<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>
Shervin
  • 1,936
  • 17
  • 27
  • Thanks Shervin, I wasn't aware of the option to put multiple elements into one and the same XLIFF document. Good to know. In the meantime, I had decided to let my web service produce different XLIFF documents for each requested language. – rplantiko May 14 '14 at 16:00
6

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.

Remy
  • 12,555
  • 14
  • 64
  • 104
  • Thanks, Remy, that was what I wanted to know. – rplantiko Feb 04 '13 at 10:37
  • Is there an option to handle the same language but for multiple locales for example (de-at, de-ch, de-lu) using the same file for all 3 locales? – stackg91 Nov 22 '22 at 10:48
  • Not sure about the standard, but I don't think most tools will be able to work with that. So I would not recommend it. – Remy Dec 13 '22 at 14:44
0

According to the OASIS wiki:

An XLIFF document is normally a bilingual file. It has one source language (the language of the original extracted file), and one target language. However, the <alt-trans> elements can be in language other than the source or target one.

Source: How many languages can I put in an XLIFF document?

TheSteelDuck
  • 165
  • 1
  • 9