Task overview: Internationalizing application components (internationalization service)
This topic summarizes the steps involved in using the internationalization service.
With the internationalization service, we can manage the distribution of the internationalization information, or internationalization context, that is necessary to support globalized JEE application components. Supported application components also include web service client environments and web service-enabled enterprise beans.
- Use the internationalization context API within application components to obtain or manage internationalization context.
Servlet and enterprise bean business methods can use internationalization context to perform locale- and time zone-sensitive localizations. EJB client applications, and server components that are configured to manage internationalization context must use the internationalization context API to set the context elements scoped to their invocations.
Use internationalization context API within Web service-enabled Java EE client programs and stateless session beans in the same manner that you would use conventional Java EE application components, with one exception. Internationalization context propagated over Web service requests contains a time zone ID, whereas conventional Remote Method Invocation/ Internet Inter-ORB Protocol (RMI/IIOP) requests propagate complete time zone information, including the raw offset, Daylight Savings Time information, and so on.
- Assemble internationalized applications.
The internationalization type specifies the internationalization policy that applies to a servlet or an enterprise bean and, in particular, indicates whether the application component or its hosting Java EE container manages internationalization context. Container internationalization attributes can be specified for container-managed servlet and enterprise bean business methods. These attributes tailor a policy by indicating which context the container scopes to an invocation. Configuring internationalization policies declaratively prescribes, by means of the application deployment descriptor, the distribution and management of context throughout an application.
As you edit the deployment descriptor for assembly, we can also set the internationalization type and configure any container internationalization attributes for the servlets and enterprise beans in the application.
You configure internationalization type and container internationalization attributes for Web service-enabled stateless session beans in the same manner as you do for conventional beans.
- Manage the internationalization service.
Use the administrative console to enable the service on all application servers.
By default, the service is enabled within Java EE client environments but is disabled on application servers. We must enable the service on all application servers hosting the servlets and enterprise beans to use internationalization context.
- Troubleshoot the internationalization service as needed.
Use the administrative console to enable the trace service to log internationalization service messages when debugging the applications.
The trace strings for the internationalization service follow; use both:
com.ibm.ws.i18n.context.*=all=enabled:com.ibm.websphere.i18n.context.*=all=enabled
Subtopics
- 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.
- Assemble internationalized applications
Perform this task to configure application components for deployment with the internationalization service.
- Use the internationalization context API
EJB client applications, servlets, and enterprise beans can programmatically obtain and manage internationalization context using the internationalization context API. For Web service client applications, you use the API to obtain and manage internationalization context in the same manner as for EJB clients.
- Administer the internationalization service
To use internationalization context in an EJB application, the internationalization service must be enabled in the runtime environments for all server-side components (servlets and enterprise beans, including session beans enabled for Web service usage) as well as all client-side components (EJB client applications and Web service clients).
Related concepts
Globalization Internationalization context: Management policies
Related tasks
Task overview: Globalizing applications
Globalization: Resources for learning