Localization of Reports

Style Intelligence conforms fully to the standard Java localization API, such as date and number formatting. The InetSoft class library itself does not embed hard-coded text strings in report elements or the GUI components (Menu Item, Dialogs Boxes, etc.).

All data on a report (text and tables) is retrieved at report execution time from the specified data source(s). Thus, in terms of localizing the displayed report data, there is no special handling necessary for the InetSoft toolkit. However, the text strings embedded in the text elements of applications such as the previewer and the Report Designer are an exception.

InetSoft products support localization of the visual components through the use of a text catalog. The catalog is a mapping from the embedded strings to any other strings. By default the catalog is empty, which means no translation is performed. To perform translation of the embedded strings to other values, you need to populate the mapping in the catalog.

As of version 7.0, the recommended way to localize the visual components contained in Style Intelligence is through the use of resource bundles.

A report designer may also be interested in localization of the text contained in elements in the report. A report created in one country might be viewed in another country by users who speak a different language and who would benefit from a translation. InetSoft products support the internationalization of report elements through a resource bundle accessed by the UserCatalog class.

Using a Resource Bundle to Map Text from One Value to Another

Resource bundles are a concept introduced in JDK1.1 specifically for internationalization. A resource bundle is implemented as a Java class. It implements an API that basically provides a mapping of object values. The difference between a resource bundle and a regular Java class is the way they are located and loaded. A regular Java class is uniquely identified by a fully qualified class name. When loading a class, the class is either found as specified or not found and an error is reported. A resource bundle name, on the other hand, can refer to one or more Java classes. The resource bundle related classes have names that include their intended locale values. For details on how resource bundles are used, refer to the JDK internationalization documentation.

Note that the mapping values used by a resource bundle may be loaded from a properties file. Assume that we want to map the word 'Close' to 'Quit'. We can create a properties file containing a single line:


Save this file as 'mapping.properties' (or any valid name) and place this file in a directory that is on the CLASSPATH. The mapping file can be activated in the Report Designer by setting the property StyleReport.locale.resource in the .stylereport file located in the user home directory. You can also load the Designer from the command prompt with the following code:

java –DStyleReport.locale.resource=mapping inetsoft.report.design.Designer

view demo icon
View a 2-minute demonstration of InetSoft's easy, agile, and robust BI software.