Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Migration of unmigrated content due to installation of a new plugin

...

Code Block
<Measure name="Measure 1" caption="%{myMeasure1}" column="unit_sales" aggregator="sum" />
<Measure name="Measure 2" caption="%{myMeasure2}" column="unit_salesunits" aggregator="sumcount" />

Notice the usage of the _%%{ }. While most of the contents can be localized, keep in mind that it is recommended to localize the captions only, since localizing the actual names might have some behind-the-scenes consequences which are not always obvious. The caching will have a hard time providing decent performance, since all members of your queries will keep changing names as users come and go. Also, queries written by a given user in a given locale might not work in a different setup because the members will have different names, thus invalidating your queries. It is therefore strongly recommended to localize only the captions and to maintain unique member names through all locales.

2. Edit [ solutions folder]:/system/mondrian/mondrian.properties

...

Code Block
mondrian.rolap.localePropFile=com.pentaho.messages.MondrianMessages

3. Edit [solutions folder]:/system/olap/datasources.xml

...

Code Block
<DataSourceInfo>Provider=mondrian;DataSource=SampleData;DynamicSchemaProcessor=mondrian.i18n.LocalizingDynamicSchemaProcessor;UseContentChecksum=true</DataSourceInfo>

The two following properties were added to the DataSourceInfo element.

  • DynamicSchemaProcessor
    This property points to a fully qualified class name implementing mondrian.spi.DynamicSchemaProcessor. Dynamic schema processors are classes who filter the schema file contents and provide a filtered output to Mondrian's core. Mondrian comes with a dynamic schema processor who searches for tokens and replaces them with values from Java localization files. As a matter of fact, it is implemented with Java's standard localized messages framework.
  • UseContentChecksum
    This property tells Mondrian to maintain a checksum of the schema XML and expose it through mondrian.olap.Schema.getId(). This property is used by Pentaho Analyzer to detect changes in the schema and refresh his caches. Also note that enabling this feature will make Mondrian call the schema processor for every connection request. This means that your schema processor implementation is expected to perform caching when necessary to avoid unnecessary processing.

4. Create your language files

You now need to create your localization files. First, navigate to [ platform-folder]:/biserver-ee/tomcat/webapps/pentaho/WEB-INF/classes/com/pentaho/messages. If some folders are missing (chances are all those inside the 'classes' folder won't be present), create all missing folders manually. Then you will need to create one text file per language you want to support, using the standard localization files convention. As an example, files to support both English and French would be respectively:

...