Internationalization Guide
The following sections describe how to use the Message Editor:
The Message Editor is a graphical interface tool that allows you to create, read, and write XML message catalogs. The Message Editor is installed when you install WebLogic Server. Optionally, you can also edit the XML catalogs directly in a text editor or any XML editing tool.
Note: WebLogic Server provides its own message catalogs, which contain messages relating to WebLogic Serversubsystems and functionality. You cannot edit these catalogs. For descriptions of WebLogic Server catalogs, see the Index of Messages by Message Range.
Note: The Message Editor does not support the editing of localized catalogs.
You use the Message Editor to perform the following tasks:
Before you start the Message Editor, install and configure your WebLogic Server system and set your environment variables (setExamplesEnv.cmd). Make sure that your classpath is set correctly. For more information on these topics, see the Installation Guide.
Sample message catalog files are located in your SAMPLES_HOME/server/examples/i18n/msgcat/ directory.
You can use the sample message catalogs as templates to create your own messages. You simply modify the provided information, such as the package name and class name. Then translate the message text and save the catalog. For more information on this topic, see Writing Messages to the WebLogic Server Log in Using WebLogic Logging Services.
Note: The location of your samples/ directory path may vary, depending on where you chose to install WebLogic Server.
To start the Message Editor, type:
java weblogic.MsgEditor
or
java weblogic.i18ntools.gui.MessageEditor
To access basic command line help, type:
The main WebLogic Message Editor window for Log Messages displays as shown in Figure 3-1.
Figure 3-1 WebLogic Message Editor for Log Messages
The following sections describe how to use the Message Editor to manage catalogs:
To find an existing catalog from the main WebLogic Message Editor window, enter the full pathname in the Message Catalog field, or click Browse and navigate to the existing catalog from the Open dialog.
Figure 3-2 Navigating to a Catalog
The sample catalogs included with your WebLogic Server installation are in the SAMPLES_HOME/server/examples/i18n/msgcat/ directory.
Note: This directory path may vary, depending on where you installed WebLogic Server.
You can place your user-defined catalogs in any directory you designate.
Once you locate the Packages, Subsystem, Version, Base ID, and End ID (if any) for that catalog are displayed, and that catalog is the context catalog in which all other actions are performed. You are now ready to enter new messages into that catalog, edit existing messages, search for a message, or view all messages in the catalog.
If a log message catalog is selected in the Message catalog field, the WebLogic Message Editor window for Log Messages displays as shown in Figure 3-3.
Figure 3-3 WebLogic Message Editor for Log Messages
If a simple messages catalog is selected in the Message catalog field, the WebLogic Message Editor window for Simple Messages displays as shown in Figure 3-4.
Figure 3-4 WebLogic Message Editor for Simple Messages
To create a new catalog, complete the following procedure:
The "Create new catalog" dialog displays as shown in Figure 3-5.
xml
extension. Or, click Browse and navigate to the appropriate catalog directory. (This would be the msgcat
directory if you are using WebLogic Server example messages.)If you select a log message catalog, the Base ID and End ID fields are displayed. These fields indicate the range of ID numbers for messages in the catalog. If you select a simple text message catalog, these fields disappear.
weblogic.i18n
. If you want to place your logger classes in another package with your application, specify the package name here.weblogic.l10n
. If you want to place your catalog data in another package with your application, specify the package name here.
The following sections describe how to use the Message Editor to add messages to catalogs:
To enter a new message into a log catalog:
{
n
}
. For example: "Exception occurred while loading _WL_TIMESTAMP FILE."{
n
}
. For example: "Exception occurred while loading _WL_TIMESTAMP FILE. Forcing recompilation: {0}."{
n
}
. For example: "There was an error reading this file."To enter a simple text message into a simple messages catalog:
The WebLogic Message Editor for Simple Messages dialog displays as shown in Figure 3-7.
The following sections describe how to use the Message Editor to find messages:
Figure 3-8 Search for Log Message
The fields are strung together to find the message. If a matching message is found, it displays in the main Message Editor window as shown in Figure 3-1.
To find a simple text message, complete the following procedure:
Figure 3-9 Search for Simple Message
The fields are strung together to find the message. If a matching message is found, it displays in the main Message Editor window as shown in Figure 3-4.
The WebLogic Message Editor contains a Message Viewer that allows you to view all messages in a catalog, view all messages in multiple catalogs, and choose any message to edit.
The following sections describe how to use the Message Viewer to view and choose messages to edit:
To view all the messages in a catalog:
If you view the messages from the current context catalog, and then change the context by clicking Browse on the WebLogic Message Editor main window to navigate to a new catalog, the old view of the old catalog remains on the screen while you view the new catalog in a second Message Viewer window. Repeating this step allows you to view messages for as many catalogs as you require (or can reasonably fit on your screen). Each catalog displays in a separate Message Viewer window. Refer to Browsing to an Existing Catalog for information about Browsing to a new catalog.
After you use the Message Viewer to view a list of messages, you can click on any message displayed in any row of the Message Viewer. The catalog for the selected message becomes the context catalog and the message displays in the Message Editor main window.
Figure 3-11 Message Viewer and Message Editor for Message 909001
You can retire and unretire messages in the main Message Editor window. Retiring a message does not mean that the message is deleted from the master catalog. It simply means it is hidden from user view. This feature is useful for removing obsolete messages. If you need to bring a retired message back into view, you can unretire it.
To retire or unretire a message, complete the following procedure: