Internationalization/Localization of Reports

Multi-national corporations often need to provide information and reports an multiple languages - this of course also applies to reports which are extracted out of a system like SAI360.

SAI360 BI does provide means to internationalize reports which are created in the Report Designer, as outlined below:

If you want to ...

Perform these steps ...

Internationalize/Localize a Report.

The following information is a direct quote from the Pentaho Info Center:

Report Designer can dynamically pull text content from message bundles that contain localized strings. This enables you to localize the static and dynamic text content in a report.

To dynamically localize a report, you MUST USE one of these following field types:

  • Resource Message
  • Resource Label
  • Resource Field.

You'll use these in place of standard report text elements.

Follow the below procedure to prepare a report for localization.

  • Open the report you want to localize.
  • Go to the File menu and select Resources.... The Resource Editor window will appear.
  • Click Create to create a new default resource bundle. A resource details window will appear.
  • Type in a file name for your resource file (using a .properties extension), and select its content type from the drop-down list. You should name this properties file without any country or language codes. Pentaho Reporting will default to a non-localized message bundle name if no locale is specified, so the first message bundle you create should be the one you want to use by default. Typically you would use the report name for the resource bundle name. So for an InventoryList.prpt report, you would name your resource bundle InventoryList.properties.
  • In the Resource Editor, select the message bundle you just created, then click Edit. A text window will appear.
  • Enter name/value pairs for all of the Resource Labels you intend to create, with the name of the label on the left and the value on the right, as shown in the example below.

    title=Sales Report 2011
    companyLabel=Steel Wheels, Inc.
  • Repeat the previous four steps for every locale and language you want to account for, using the appropriate language and country codes in the file names. Following the example above, the traditional French version of the properties file would be InventoryList_fr_FR.properties. Refer to the Customizing Pentaho Business Analytics document for more details on message bundle naming conventions.
  • Add a Resource Label, Message, or Field to the report canvas.
  • With the new element selected, go to the Attributes pane.
  • Set the name of this replaceable resource in the value field. This must match the name that you specified in your message bundle earlier. To follow the example above, your resource labels should be named title and companyLabel.
  • Set the name of the resource bundle that will contain this replaceable resource in the resource-id field. This should not have a .properties extension. Following the example above, this would be InventoryList.

Your report will be localized according to your specifications. You can test this by changing the language code for Report Designer through the .environment.designtime.Locale variable in the Configuration dialogue in the File menu.

 

Additional Information

  • Language files can be embedded in each individual report, or they can be maintained at a central location.
  • The locale which being applied is determined by the language setting of the user's browser.

See Also

Use of the SAI360 BI Report Designer

Using Database Tables as Source

Using Cubes/Schemas as Source

Building a Report - Using Parameters

Using SAI360 Parameters for BI Reports

Building a Report - Showing Related Data in Sub-Reports

Hyperlinks to SAI360 in BI Reports

Including Images in a Report

Including "Sparklines" into a Report

Use of Profile Values in a Report

Conditional Formatting of Data