Configuring locales
<context root>\WEB-INF\localemap.xml contains the locales available to Visualization Platform client. Add locales to this file using the same format as the existing locales. To see each locale in the file, search for one of the following strings:
<Locale
or:
<DisplayName>
Searching for <Locale places the cursor on the line having the ID for the locale. Searching for <DisplayName> places the cursor on the line having the descriptive name for the locale.
Typically, the locale names have the following syntax:
<language>_<country>
For example, ar_EG is Arabic (Egypt). A language spoken in multiple countries has multiple locale names for which the language code is the same and the country code has several values. For example, en_US is the locale for English (United States), en_AU is the locale for English (Australia), and en_BZ is the locale for English (Belize). Some countries have several locales, one for each language. For example, Canada has both en_CA for English (Canada) and fr_CA for French (Canada). You specify a default locale for a custom web application in <context root>\WEB-INF\web.xml.
Configuring time zones
<context root>\WEB-INF\TimeZones.xml contains the time zones available to Visualization Platform client. Add time zones to this file by using the same format as the existing time zones. To see each time zone in the file, search for one of the following strings:
<TimeZone
or:
<DisplayName>
Searching for <TimeZone places the cursor on the line having the ID for the time zone. Searching for <DisplayName> places the cursor on the line having the descriptive name for the time zone.
Some time zone names have short abbreviations for the ID. All time zone names have a full descriptive ID, such as Samoa Standard Time or Greenwich Standard Time. The DisplayName provides the relative time from Greenwich Standard Time and one or more locations that the time zone includes. You specify a default time zone for a custom web application in <context root>\WEB-INF\web.xml.
Customizing messages and text according to locale
Error messages and text for Visualization Platform client are encoded in resource files compressed in the <context root>/WEB-INF/lib/resources.jar file. The properties files contain entries for the interface text and error codes Visualization Platform client generates.
For reference, the <context root>/WEB-INF/ErrorMessage.txt file lists the default error codes used by Visualization Platform client. The \com\actuate\reportcast\resources\ErrorMessages.properties file within the resources.jar archive contains error messages for the default locale. Visualization Platform client uses messages from this file if no locale-specific message for the error exists. Not all of the codes exist in the default ErrorMessages.properties because iHub directly generates many of them in the SOAP messages sent to Visualization Platform client.
Override iHub and Visualization Platform client messages using a locale-specific error messages file. In addition to the default ErrorMessages.properties file, Visualization Platform client provides several localized error message files, such as ErrorMessages_de_DE.properties. This file contains the German language messages for the Germany locale. To specify error messages to a certain locale, modify the existing error message file for that locale or create a new file for the locale. By convention, the format of a locale-specific error message file name includes the language and locale codes at the end of the file name separated by underscore characters.
For example:
ErrorMessages_de_DE.properties
*de is the language code for German.
*DE is the Germany country code.
These values for language and locale codes are defined in localemap.xml.
Because alphabets for different languages are dissimilar and Visualization Platform client uses ASCII encoding for these files, you must convert new or edited files into ASCII format. To convert the files to ASCII, modify the properties file using an editor that saves to the UTF-8 format and convert the file to ASCII using the Java native2ascii utility using the -encoding UTF-8 switch. The native2ascii utility installs with any Java Developer Kit in the <JDK home>/bin directory. Model the format of new messages after those in the ErrorMessage.properties file.
When your modifications are complete, recompress the resources.jar archive using the Java jar utility, retaining the original directory structure for the archive. Copy the new resources.jar file to the <context root>/WEB-INF/lib directory, restart the Actuate 11 Apache Tomcat for Visualization Platform client service, and log in using the locale for the modified messages file. Confirm that the new messages file was loaded by examining the error messages generated by Visualization Platform client using that specific locale.
Error messages appear in pop-up windows when an error is encountered. The window is an operating system window, not an HTML frame. If you use a language-specific version of Windows corresponding to the locale you are viewing, the localized message shows up correctly. If you have not loaded the Windows language pack for a language, the text of a message appears as empty squares instead of text.