Skip to main content
Pentaho Documentation

Localization/Internationalization of Analysis Schemas

You can create internationalized message bundles for your analysis schemas and deploy them with the Pentaho Web application. This enables Pentaho Analyzer to access localized schemas.

  1. Edit your analysis schema and tokenize all values that you want to localize. Typically you would create variables for all caption and description values.
    <Schema measuresCaption="%{foodmart.measures.caption}">
        <Dimension name="Store" caption="%{}" description="%{}">
            <Hierarchy hasAll="true" allMemberName="All Stores" allMemberCaption="%{ =All Stores}" primaryKey="store_id"  caption="%{}" description="%{}>
                <Table name="store"/>
                <Level name="Store Country" column="store_country" uniqueMembers="true" caption="%{}" description="%{}"/>
  2. Create localized files in the /WEB-INF/classes/com/pentaho/messages/ directory inside of the Pentaho WAR, and define each token you used in the analysis schema.

    JBoss users will have to delete the unpacked Pentaho WAR directory if it exists, then unpack the pentaho.war file with an archive utility, create the message bundles in the proper location, then repack it into a WAR again.

    If you need further assistance in creating localized message bundles, refer to Pentaho Server and Thin Client Message Bundles.

    foodmart.measures.caption=Measures Country Type Name State Manager Sq. Ft. Stores
    foodmart.cube.sales.caption=Sales City
    foodmart.cube.sales.measure.unitsales=Unit Sales
  3. Edit the file in the /pentaho/server/pentaho-server/pentaho-solutions/system/mondrian/ directory and add this line (or modify it if it's already there):
  4. Save and close the file.
  5. Restart the Pentaho Server.
  6. Login to the User Console with administration permissions, then click Manage Data Sources, then the Add button. Choose Analysis from the menu. Browse to import your file.
  7. Edit your Analysis data source by checking the option next to Manually enter data source parameters.
    1. If absent from the list of parameters, add one parameter called DataSource whose value is the name of the JDBC data source to use.
    2. Create a new parameter called Locale and enter the value for the language that you want to make available.
    3. Create a new parameter called DynamicSchemaProcessor whose value is mondrian.i18n.LocalizingDynamicSchemaProcessor.
    4. Create a new parameter called UseContentChecksum whose value is true.
  8. In the User Console, go to Tools > Refresh > Mondrian Schema Cache.

Your analysis schemas will now be localized to whatever language is currently selected in the Pentaho User Console, if a message bundle for that locale was copied to the proper directory as explained above.