Introduction: Internationalization


 

+

Search Tips   |   Advanced Search

 

With the internationalization service, we can automatically recognize the time zone and location information of the calling client so that the application can act appropriately. The technology enables you to deliver each user, around the world, the right date and time information, the appropriate currencies and languages, and the correct date and decimal formats.

Globalization

An application that can present information to users according to regional cultural conventions is said to be globalized: The application can be configured to interact with users from different localities in culturally appropriate ways. In a globalized application, a user in one region sees error messages, output, and interface elements in the requested language. Date and time formats, as well as currencies, are presented appropriately for users in the specified region. A user in another region sees output in the conventional language or format for that region. Globalization consists of two phases:

  • internationalization: Enabling an application component to use regional conventions
  • localization: Implement a specific regional convention

Internationalization service

In a distributed client-server environment, application processes can run on different machines, configured for different locales, corresponding to different cultural conventions; they can also be located across geographical boundaries. The internationalization service can help manage the application in a globally distributed environment.

Internationalization context

An internationalization context is a distributable collection of internationalization information containing an ordered list, or chain, of locales and a single time zone, where the locales and time zone are instances of the java.util.Locale and java.util.TimeZone Java SDK types, respectively. A locale chain is ordered according to the user's preference.

Internationalization context: Propagation and scope

The scope of internationalization context is implicit.

Every EJB client application, servlet service method, and EJB business method call has two internationalization contexts under which it runs. For each application component call, the container enters the caller context and the call context, as indicated by the pertinent internationalization policy, into scope before the container delegates to the actual implementation. When the implementation returns, the service removes these contexts from scope. The internationalization service supplies no programmatic mechanism for components to explicitly manage the scope of internationalization context.

Internationalization context: Management policies

Internationalization policies prescribe how Java EE application components or their hosting containers manage internationalization context on component invocations. Two internationalization context management policies apply to all component types: Application-managed internationalization (AMI) and Container-managed internationalization (CMI).