|
|
| |
Overview of Internationalization for WebLogic Server
Internationalization (I18N) refers to the preparation of software so that it behaves properly in multiple locations. Localization (L10N) is the use of locale-specific language and constructs at run time. The information covered in this guide only addresses the presentation of textual data.
Log messages contain data that is written to the log file. This data is predominantly dynamic, and contains information that is specific to the current state of the application and system. When merged with text in a localized log message catalog, this data results in well-formatted, localized messages that describe the error condition in the language of the user.
This section includes the following topics:
Understanding Log Messages
To create an internationalized message, all message strings must be externalized in a message catalog so that they can be easily converted to multiple locales without changing or recompiling the code. The application code supplies any run-time values to the logging methods, which merge the code with the message strings in the catalog per the current locale, and prints a localized message in the log files.
Within the message catalog file, each message is assigned a unique message ID and message text specific to the error. Ideally, a message is logged from only one location within the system so that a support team can find it easily.
The following steps are involved in creating an internationalized message:
In addition to message text, a catalog entry also contains information about the type and placement of any run-time values that the message contains.
For more detailed information, including an overview of the logging subsystem and a description of log message parts, see Using Log Messages to Manage WebLogic Servers in the WebLogic Server Administration Guide.
Understanding Localization
Localization covers not only language, but collation, date and time formats, monetary formats, and character encoding. Messages that are logged to the WebLogic Server error log can be localized.
WebLogic Server internationalization supports localization of two types of data:
Java Interfaces for Internationalization
Users of the Java internationalization interfaces should be familiar with the following interfaces included in the Java Developer's Kit (JDK):
Internationalization catalogs reside as XML files in the directory
weblogic/msgcat
Localization catalogs reside as XML files in subdirectories to weblogic/msgcat. (see Catalog Hierarchy). These XML catalogs are compiled into classes during the build process; the methods of the resulting classes are the objects used to log messages at runtime.
The message catalogs are XML files that contain a description of a collection of text messages, each indexed by a unique idenifier. Catalogs for the base locale are defined by the document type definition (DTD) in msgcat.dtd. Catalogs which provide different localizations of the base catalogs are defined in msgcat subdirectories named for the locale (for example, weblogic/msgcat/ja for Japan), and use l10n_msgcat.dtd.
|
Copyright © 2001 BEA Systems, Inc. All rights reserved.
|