Implementing InterSystems IRIS Business Intelligence
This chapter describes how to localize strings in InterSystems IRIS Business Intelligence. It discusses the following topics:
This section provides an overview of how InterSystems IRIS Business Intelligence supports localization of strings.
The system provides a simple mechanism for localizing the names of level, measures, and other model elements.
Every element in the Business Intelligence model has a logical value and a display value. You specify the logical value, the original display value, and alternative display values for use with other language locales. Then:
In MDX queries, you always use the logical value.
The user interfaces use the appropriate display value, if available. The user configures the browser to use a preferred language, and when the browser sends requests to a server, those requests indicate the preferred language to use, if available. The server sends a reply that includes the appropriate set of strings, based on that language preference.
In a similar manner, you can localize a specific set of following strings within dashboards, pivot tables, and other folder items. For these strings, you specify the original display value and alternative display values for use with other language locales.
The User Portal and the dashboard viewer use the appropriate display value, if available. The user configures the browser to use a preferred language, and when the browser sends requests to a server, those requests indicate the preferred language to use, if available. The server sends a reply that includes the appropriate set of strings, based on that language preference.
To prepare for localization of strings in the Business Intelligence models, do the following:
Specify the DOMAIN
class parameter in each cube, subject area, and KPI class.
Parameter DOMAIN = "PATIENTSAMPLE";
The classes in the Patients sample all use the same value for DOMAIN
, but this practice is not required. You can specify a different value for each class.
Specify a value for the displayName
attribute for every Business Intelligence element.
In the Architect, when you specify a name, the system initializes the Display name
field with the same value. When you work in Atelier, however, you must remember to specify the displayName
attribute (which is optional), in addition to the name
attribute (which is required).
When you compile the classes, the system adds values to the ^IRIS.Msg
global in this namespace. These values may look like this:
This global (which is known as the Message Dictionary
) contains the messages
defined in this namespace; for Business Intelligence, each message corresponds to the name of a model element.
When you compile a cube, subject area, or KPI class that defines the DOMAIN
parameter, the system updates this global to include the messages defined in that class, in your default language. Each message uses a numeric identifier and has a string value that applies to the default language.
If you do not see the expected set of strings, make sure that the class defines the DOMAIN
parameter, that you have specified values for displayName
, and that you have compiled the class.
This section describes how to prepare for localization of strings in the dashboards, pivot tables, and other folder items.
is the domain that the system uses by default when it looks for a localized string in a dashboard. For details, see the following sections.
Create a class that, when compiled, generates a set of entries in the Message Dictionary. In this class:
Specify the DOMAIN
class parameter. For example:
Parameter DOMAIN = "DeepSeeUser";
You can specify any name for the method. It does not need to take any arguments or return any values. The following shows an example:
set x=$$$Text("Dashboard Title")
set x=$$$Text("Dashboard Description")
set x=$$$Text("Control Label")
set x=$$$Text("Widget Title")
set x=$$$Text("Chart Title")
When you compile this class, the compiler finds each instance of the $$$Text
macro and adds values to the ^IRIS.Msg
global in this namespace.
In the definition of a dashboard, pivot table, or other folder item, use one of the following values instead of the exact string that you want to see:
Use these values for any of the following strings in the folder item definition:
(For dashboards) Dashboard title (if specified, this is shown instead of the dashboard name)
Labels for dashboard controls
Tooltips for dashboard controls
Titles of widgets (but not their logical names)
Chart titles within dashboard widgets that display charts
Export the Message Dictionary to one or more XML files. To do so, do the following in the Terminal:
Change to the namespace in which you are using Business Intelligence.
Identify the output file and its location:
The specified directory must already exist; the system does not create it.
It may be practical to export only those messages in a particular domain:
The domain names are case-sensitive.
Or, to export all the messages in the namespace:
For each desired language, make a copy of the message file.
Edit each message file as follows:
Edit the Language
attribute of the root element:
Change this to the language name of the desired language.
This must be an all-lowercase language tag that conforms to RFC1766
(so that a user can choose the preferred language in the browser from the standard set). This tag consists of one or more parts: a primary language tag (such as en
) optionally followed by a hyphen (-) and a secondary language tag (so that the result has the form en-gb
Scan the file to find the <MsgDomain>
element that corresponds to the appropriate domain:
If you exported only one domain, the file contains only one <MsgDomain>
Within this section, edit the value of each message. For example, change this:
Import the edited message file or files. To do so:
To import all the files in the same directory:
Optionally use the Management Portal to verify that the message dictionary has been updated. To do so, switch to the appropriate namespace, select System Explorer
, and then click View Globals
for the ^IRIS.Msg
Within this global, you should see a new set of subscripts that correspond to the language you have added.
In your browser, find the setting that controls the language that it requests for use on localized pages. Change this setting to the language that you specified in the edited message file.
Depending on the browser, you might need to clear the browser cache, restart the browser, or both.
Access the Analyzer and validate that you see translated strings.