Internationalization of Report Elements

With respect to internationalization report elements certain report elements have a TextID property, which associates the literal text for the element with replacement text tored in the property file, according to the Java resource bundle conventions. You can link the element text contents to the mapping name used in the file for text, textbox, chart, table, and form elements. Although it is possible to set the TextID property on an element programmatically, it is highly recommended that this operation be performed in the Report Designer (Edit → Localization).

By default, the resource bundle name is 'SreeBundle', but it is possible to use a different name by setting sree.bundle in the sree.properties file. The individual files in the bundle should end with the locale string specifying which language (and optionally which country) the replacement text is intended for.

The inetsoft.report.UserCatalog class can then be used to load the class or property file containing the replacement text and also to perform the replacement.

// Use SreeBundle_en_US.properties or 
// SreeBundle_en_US.class
UserCatalog userCat = new UserCatalog(getPrincipal()); 
userCat.localize(report); 

Note that when viewing a report in the Report Portal, the replacement operation is performed automatically.

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


Transformation

Style Intelligence provides a CatalogVerifier file to convert older version 6.5 properties files to a resource bundle that is compatible with the latest version. This tool is known as the CatalogVerifier and the usage syntax is as given below.

java inetsoft.util.CatalogVerifier

Transform

We use the following syntax to transform a version 6.5 properties file to a resource bundle compatible with the latest version.

java inetsoft.util.CatalogVerifier -v 6.5 [file_old_properties] [file_new_properties] [mismatch.txt]

where [file_old_properties] is your locale properties file, [file_new_properties] is the combined new resource bundle. Here the mismatch.txt file contains all the mismatch between the old property file and the new resource bundle that are not needed and hence not contained in the resource bundle. If the mismatch.txt file is not specified, these differences are printed in the user console.

Comparison

We use the following syntax to compare a user defined properties file (“user.properties”) with the default resource bundle file.

java inetsoft.util.CatalogVerifier [file_user_properties] [mismatch.txt]

The mismatch.txt file contains all of the mismatches between the user defined properties file and the default resource bundle. If mismatch.txt is not specified then all the mismatches are printed in the console.

Read the top 10 reasons for selecting InetSoft as your BI partner.