2 Using Message Catalogs with BEA WebLogic Server
2-2 Internationalization Guide
Message catalogs support multiple locales or languages. For a specific message
catalog there is exactly one default version, known as the top-level catalog. Then there
are corresponding locale-specific catalogs, one for each additional supported locale.
The top-level catalog includes all the information necessary to define the message. The
locale-specific catalogs contain only the message ID, the date changed, and the
translation of the message for the specific locale.
The message catalog files are defined by an XML document type definition (DTD).
The DTDs are stored in the
msgcat directory. The location of the msgcat directory
may vary, depending upon where you installed WebLogic Server. If you used the
default installation path, the
msgcat directory is located in the BEA_HOME directory
under
WL_HOME\samples\server\src\examples\i18n\msgcat.
Two DTDs are included in the WebLogic Server distribution:
msgcat.dtd—Describes the syntax of top-level, default catalogs.
l10n_msgcat.dtd—Describes the syntax of locale-specific catalogs.
The
msgcat directory also contains templates that you can use to create top-level and
locale-specific message catalogs.
Users may choose to create a single log message catalog for all their logging
requirements, or create smaller catalogs based on a subsystem or Java package. We
recommend using multiple subsystems because you can focus on specific portions of
the log during viewing.
For simple text catalogs, the recommended approach is to create a single catalog for
each utility being internationalized. Developers can create site-specific message
catalogs using the Message Editor as described in “Using the BEA WebLogic Server
Message Editor” on page 3-1.
Message Catalog Hierarchy
All messages and exceptions must be defined in the default, top-level catalog. The
WebLogic Server distribution includes a collection of sample catalogs in the
WL_HOME\samples\server\src\examples\i18n\msgcat directory.