Configure appearance of Web Determinations by locale

Configure appearance of Web Determinations by locale

What do you want to do?

Understand how Web Determinations works with locales

Apply a language specific theme to Web Determinations

Change the text displayed for a specific language

Understand how Web Determinations works with locales

Interview Engine versus Web Determinations

When discussing localization in Oracle Web Determinations, it is important to distinguish between what is the concern of the Interview Engine and that of any clients to that engine such as the Web Determinations platform. In simple terms the Web Determinations client is responsible for localizing everything that is not authored as a part of the rulebase. Further, all Web Determinations and rule engine sessions are created in a specific locale and it is assumed that anything coming out of the rule engine session will be localized according to that locale.

Examples of what the Interview Engine is responsible for include:

 

Examples of what Web Determinations is responsible for:

Select the session locale

Select the locale for an interview session

Once an interview session is started in Web Determinations for a given rulebase, the locale that was used to create that session controls the culture of the screens that are displayed for the duration of that interview. There are two ways of selecting the locale for a session:

  1. Select the locale on the locale selection screen that is presented after the user selects the rulebase they wish to use. In the case where the selected rulebase is only available in one locale, Web Determinations will bypass the locale selection screen and automatically start an interview session in that locale.
  2. By specifying the rulebase and locale to use via the URL This method allows investigations to automatically be started for a given rulebase in a given locale, thereby bypassing both the rulebase and locale selection screen. The format of the URL is:
http://<server>:<port>/<webapp>/startsession/<rulebase>/<locale>

For example, to start a session in the 'en-US' locale for the rulebase 'MyRulebase' the URL would look something like:

http://server:8080/web-determinations/startsession/MyRulebase/en-US
Specifying the default locale

Whilst the vast majority of screens in Web Determinations come from the rulebase, there are a few that are not bound to an interview, most notably the rulebase and locale selection screens. In this case, the locale that is used is defined by the 'default.locale' property in the application. properties configuration file.

Localizing error and warning messages

For information on the localization of error and warning messages, go to the topic below, Change the text displayed for a specific language.

See also:

messages.<locale>.properties file

Localizing Input and Output formats

Web Determinations allows the accepted input and output format(s) of Date, DateTime, Currency and Number attributes to be specified on a per locale basis using its default formatter. The relevant configuration properties are located in the message.properties file.

File Encoding

It is imperative that all localized files are saved with UTF-8 encoding. Failure to do this will cause errors when the properties located in non-UTF-8 encoded files are loaded and retrieved.

Locale codes

The two letter ISO 693-1 code is used to identify any supported language. Where there is the need to support multiple variations of any given language, this may be followed by the two letter ISO 3166-1 country code separated by a hyphen.

Out of the box we provide localizations for the following languages:

Language Locale Code
Arabic (Saudi Arabia) ar
Chinese (Simplified) zh-CN
Chinese (Traditional) zh-HK
Czech cs
Danish da
Dutch nl
English (American) en
English (Great Britain) en-GB
Finnish fi
French fr
German de
Hebrew he
Italian it
Japanese ja
Korean ko
Polish pl
Portuguese (Brazilian) pt-BR
Portuguese (European) pt-PT
Russian ru
Spanish (Modern) es
Swedish sv
Thai th
Turkish tr

 

Apply a language specific theme to Web Determinations

Web Determinations provides the ability to change the look and feel of the application on a per locale basis. The appearance of the application is controlled by the appearance properties. By default, Web Determinations only provides one set of appearance properties, however, these can be overridden on a per locale basis by copying the appearance.properties file, changing the name to appearance.<locale>.properties and then editing the property values as required.

Change the text displayed for a specific language

Localization of error and warning messages is, for the most part, the responsibility of the Oracle web Determinations platform. Only error and warning messages that implement either com.oracle.web-determinations.engine.data.error.Error or com.oracle.web-determinations.engine.data.error.Warning are localized in Web Determinations; uncaught exceptions and other non-recoverable errors are handled differently.

Within the Oracle Web Determinations platform, localization is performed through the message service which is responsible for loading the correct message bundle for the specified locale and returning the message for the specific error or warning to be localized. The message bundle itself is a properties file called messages.<locale>.properties. The location of this file is specified by the 'messages.path' property in the configuration file.

The message service also utilizes the Velocity Templating Engine to allow substitution of current property values in the error message; for example, if you wanted to display the attribute ID and the actual value that was entered in an invalid value error, you could do so by setting your error property as:

AttributeValueError = The value ${message.value} is not valid for attribute ${message.attributeId}

 

The localization settings for displayed text in Web Determinations are managed in the messages.<locale>.properties file.