TIBCO EBX®
Documentation > Reference Manual > Localization
Navigation modeDocumentation > Reference Manual > Localization

Labeling and localization

Overview

TIBCO EBX® offers the ability to handle the labeling and the internationalization of data models.

Localizing user interactions

In EBX®, language preferences can be set for two scopes:

  1. Session: Each user can select a default locale from the user pane.

  2. Data model: If a data model has been localized into other languages than those natively supported by EBX®, the user can select one of those languages for that particular data model. See Extending TIBCO EBX® internationalization for more information.

Textual information

In EBX®, most master data entities can have a label and a description, or can correspond to a user message. For example:

All this textual information can be localized into the locales that are declared by the module.

Value formatting policies

When a value is displayed to the user, it is formatted according to its type and the formatting policy of the current locale. For example, a date will be displayed in some locales as "dd/MM/yyyy" and "MM/dd/yyyy" in others.

A formatting policy is used to define how to display the values of simple types.

For each locale declared by the module, its formatting policy is configured in a file located at /WEB-INF/ebx/{locale}/frontEndFormattingPolicy.xml. For instance, to define the formatting policy for Greek (el), the engine looks for the following path in the module:

/WEB-INF/ebx/el/frontEndFormattingPolicy.xml

If the corresponding file does not exist in the module, the formatting policy is looked up in the class-path of EBX®. If the locale-specific formatting policy is not found, the formatting policy of en_US is applied.

The content of the file frontEndFormattingPolicy.xml is as follows:

<?xml version="1.0" encoding="UTF-8"?>
<formattingPolicy  xmlns="urn:ebx-schemas:formattingPolicy_1.0" 
	xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
	xsi:schemaLocation="urn:ebx-schemas:formattingPolicy_1.0 ../schema/ebx-reserved/formattingPolicy_1.0.xsd">
	<date pattern="dd/MM" />
	<time pattern="HH:mm:ss" />
	<dateTime pattern="dd/MM/yyyy HH:mm" />
	<decimal pattern="00,00,00.000" groupingSeparator="|" decimalSeparator="^"/>
	<int pattern="000,000" groupingSeparator=" "/>
</formattingPolicy>

The elements date, dateTime and time are mandatory.

The group and decimal separators that appear in the formatted numbers can be modified by defining the attributes groupingSeparator and decimalSeparator for the elements decimal and int.

Syntax for locales

There are two ways to express a locale:

  1. The XML recommendation follows the IETF BCP 47 recommendation, which uses a hyphen '-' as the separator.

  2. The Java specification uses an underscore '_' instead of a hyphen.

In any XML file (XSD, formatting policy file, etc.) read by EBX®, either syntax is allowed.

For a web path, that is, a path within the web application, only the Java syntax is allowed. Thus, formatting policy files must be located in directories whose locale names respect the Java syntax.

Documentation > Reference Manual > Localization