Translation is simplified by using Template Builder tools.
The Template Builder provides tools to help you create and test translations for templates.
The section describes options for adding translated templates to a report.
There're two options for adding translated templates to a Publisher report definition:
Create a separate RTF template that is translated (a localized template)
Generate an XLIFF file from the original template (at runtime the original template is applied for the layout and the XLIFF file is applied for the translation)
Use the first option if the translated template requires a different layout from the original template.
If you only require translation of the text strings of the template layout, use the XLIFF option.
For detailed information, see Translation Support Overview and Concepts.
To use the Template Builder translation tools to create templates for translations, see the following topics in this section:
Extracting Text to an XLIFF File for Translation
Previewing a Translation
Localizing a Template
For a demo on Publisher's localization capabilities, see the LocalizationDemo.exe demo provided with the Template Builder installation (located in the Publisher\Oracle BI Publisher Desktop\demos folder where you installed Oracle BI Publisher Desktop).
Extract Text to an XLIFF File for Translation
This menu item allows you to create a standard XLIFF translation file that contains the boilerplate text from the template. XLIFF is a standard file format that is understood by many translation software packages. Since an XLIFF is an XML file, you can translate the text in a regular text editor.
A translatable string is any text in the template intended for display in the published report, such as table headers and field labels. Text supplied at runtime from the data isn't translatable, nor is any text that you supply in the Microsoft Word form fields.
- From the Publisher menu, select Tools, then Translate Template, then Extract Text.
- You are prompted to save the extract file as an XML file type. Enter a name for the extract file and save to the desired location.
- If you want to translate the template manually, open the .xlf file using a text editor and enter the translated strings in the file.
- When done, you can preview the translation. Then upload the file to the Publisher report definition.
Preview the Template and Translation File
You can preview the translation of a template as a PDF file.
To preview the template with the translated XLIFF file applied:
- From Publisher, in the Tools group, click Translation, then Preview Translation.
- You are prompted to select the saved XLIFF file. Locate the file, and click Open.
The Template Builder merges the sample data, the translation file, and the RTF template to generate a PDF for preview.
Localize a Template
Localizing a template means that you are creating a template to be used for a specific language.
Because Publisher enables you to extract the boilerplate text strings from a template into an XLIFF file that can be translated and then applied at runtime, if the reports for additional languages only require the translation of these text strings, then you only need to supply translated XLIFF files to accompany the base template.
However, you would localize a template when the requirements for the report in the specific language go beyond the simple translation of the text in the layout.
To save a template as a localized template:
- From the Publisher menu, in the Tools group, select Translations, then Localize Template. This invokes a warning message that localizing the template overwrites the template. Click OK.
- You are prompted to select the XLIFF translation file. Locate the appropriate file and click Open.
The translated XLIFF file is applied to the template that you currently have open in Microsoft Word.
- Save the localized template.
- Upload the template file to the appropriate report definition in the catalog. Select the appropriate locale in the upload dialog.