Working with Translation Files

When you extract the translatable strings for a catalog or template translation, BI Publisher creates an XLIFF file that contains the strings.

You can translate these strings within your organization or send the file to a localization provider. You then upload the translated XLIFF file back to the catalog or the individual layout and assign it the appropriate locale.

This section describes how to work with an XLIFF file. It contains the following topics:

What Is an XLIFF?

XLIFF is the XML Localization Interchange File Format.

It is the standard format used by localization providers. For more information about the XLIFF specification, see http://www.oasis-open.org/committees/xliff/documents/xliff-specification.htm

Structure of the XLIFF File

XLIFF files must follow a specific structure

The generated XLIFF file has the following structure:

<xliff>
  <file>
    <header>
      <body>
        <trans-unit>
          <source>
          <target>
          <note>

The following illustration shows an excerpt from an untranslated XLIFF file.

Source-language and target-language Attributes

The <file> element includes the attributes source-language and target-language.

The valid value for source-language and target-language is a combination of the language code and country code as follows:

  • the two-letter ISO 639 language code

  • the two-letter ISO 3166 country code

Note:

For more information on the International Organization for Standardization (ISO) and the code lists, see the International Organization for Standardization Web site at http://www.iso.org/iso/home.html

For example, the value for English-United States is "en-US". This combination is also referred to as a locale.

When you edit the exported XLIFF file you must change the target-language attribute to the appropriate locale value of the target language. The following table shows examples of source-language and target-language attribute values appropriate for the given translations.

Translation (Language/Territory) source-language value target-language value

From English/US To English/Canada

en-US

en-CA

From English/US To Chinese/China

en-US

zh-CN

From Japanese/Japan To French/France

ja-JP

fr-FR

Embedded Data Fields

Some templates contain placeholders for data fields embedded in the text display strings of the report. To identify the embedded data fields use this token.

For example, the title of the sample report is: Italian Purchase VAT Register - (year)

where (year) is a placeholder in the RTF template that is populated at runtime by data from an XML element. These fields are not translatable, because the value comes from the data at runtime.

To identify embedded data fields, the following token is used in the XLIFF file:

[&amp;n]

where n represents the numbered occurrence of a data field in the template.

For example, in the preceding XLIFF sample, the first translatable string is:

<source>Italian Purchase VAT Register - [&amp;1]<source>

Note:

Do not edit or delete the embedded data field tokens or you affect the merging of the XML data with the template.

<source> and <target> Elements

Each <source> element contains a translatable string from the template in the source language of the template. Refer to the illustration for information to create a translation for a source element string.

For example,

<source>Total</source>

When you initially export the XLIFF file for translation, the source and target elements are all identical. To create the translation for this template, enter the appropriate translation for each source element string in its corresponding <target> element.

Therefore if you were translating the sample template into German, you would enter the following for the Total string:

<source>Total</source>
<target>Gesamtbetrag</target>

The following figure shows the sample XLIFF file from the previous figure updated with the Chinese translation: