Page 3 - Contents; About This Document
Hybrid Templates for FrameMaker 5.5 -iii Contents About This Document Audience............................................................................................................ viiie-docs Web Site.................................................................................................
Page 4 - Using the BEA WebLogic Server Message Editor
-iv Hybrid Templates for FrameMaker 5.5 message_catalog................................................................................ 2-11message ............................................................................................. 2-11messagebody .............................................
Page 5 - A. Localizer Class Reference for BEA WebLogic Server
Hybrid Templates for FrameMaker 5.5 -v Syntax ................................................................................................. 4-5Options ................................................................................................ 4-6 CatInfo Utility ...............................
Page 8 - Audience
viii Internationalization Guide Audience This document is written for application developers who must internationalize or localize the message catalogs included in the WebLogic Server distribution for locale-specific administration and management. It is assumed that readers are familiar with the Web...
Page 9 - Related Information
Internationalization Guide ix Related Information For more information in general about internationalization and localization, refer to the following sources: The Java Developer Connection™ at java.sun.com The Internationalization section of the World Wide Web Consortium (W3C) Web Site at http:/...
Page 10 - Documentation Conventions
x Internationalization Guide Documentation Conventions The following documentation conventions are used throughout this document. Convention Usage Ctrl+Tab Keys you press simultaneously. italics Emphasis and book titles. monospace text Code samples, commands and their options, Java classes, data typ...
Page 14 - Overview of Internationalization for WebLogic Server
1 Overview of Internationalization for WebLogic Server 1-2 Internationalization Guide (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. Internationalization of textual...
Page 15 - Understanding Message Catalogs
Understanding Message Catalogs Internationalization Guide 1-3 Understanding Message Catalogs All internationalized text is defined in message catalogs, each of which defines a collection of log messages or simple text. To create an internationalized message, you externalize all message strings in a ...
Page 17 - Main Steps for Creating an Internationalized Message
Main Steps for Creating an Internationalized Message Internationalization Guide 1-5 2. Run i18ngen to validate the catalog you created or edited in Step 1 and generate runtime classes. The generated classes contain a method for each message. The method is defined according to information specified i...
Page 19 - Overview of Message Catalogs
Internationalization Guide 2-1 C HAPTER 2 Using Message Catalogs with BEA WebLogic Server The following sections describe message catalogs and how to use them: Overview of Message Catalogs Message Catalog Hierarchy Choosing Names for Message Catalogs Using Message Arguments Message Catalog...
Page 20 - Using Message Catalogs with BEA WebLogic Server; Message Catalog Hierarchy
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...
Page 21 - Choosing Names for Message Catalogs
Choosing Names for Message Catalogs Internationalization Guide 2-3 Note: This directory path may vary, depending on where you chose to install WebLogic Server. Catalogs that provide different localizations of the base catalogs are defined in msgcat subdirectories named for the locale (for example, m...
Page 22 - Using Message Arguments
2 Using Message Catalogs with BEA WebLogic Server 2-4 Internationalization Guide Java allows you to group classes into a collection called a package . A package name should be consistent with the name of the subsystem in which a particular catalog resides. The log Localizer “classes” are actuall...
Page 23 - Message Catalog Formats
Message Catalog Formats Internationalization Guide 2-5 An example of a method attribute for the above message is as follows: -method=“logNoFile(String name , String path )” The message expects two arguments, {0} and {1} : {0} is used in the message body. Both are used in the message detail. Ne...
Page 26 - Other log_message Catalog Elements
2 Using Message Catalogs with BEA WebLogic Server 2-8 Internationalization Guide Other log_message Catalog Elements The following table describes the child elements of the log_message element. method None Required Method signature for logging this message. Two methods are actually provided: the one ...
Page 27 - Log Message Catalog Example
Message Catalog Formats Internationalization Guide 2-9 Log Message Catalog Example The following example shows a log message catalog, MyUtilLog.xml , with one log message. Listing 2-2 Example of a Log Message Catalog <?xml version="1.0"?><!DOCTYPE message_catalog PUBLIC "weblogi...
Page 28 - Elements of a Simple Text Message Catalog
2 Using Message Catalogs with BEA WebLogic Server 2-10 Internationalization Guide version="1.0" baseid="600000" endid="600100" <log_message messageid="600001" severity="warning" method="logNoAuthorization(String arg0, java.util.Date arg1, int arg2)"...
Page 31 - Simple Text Catalog Example
Message Catalog Formats Internationalization Guide 2-13 Simple Text Catalog Example The following example shows a simple text catalog, MyUtilLabels.xml , with one text definition. Listing 2-3 Example of a Simple Text Catalog <?xml version="1.0"?> <!DOCTYPE message_catalog PUBLIC ...
Page 32 - Elements of a Locale-Specific Catalog
2 Using Message Catalogs with BEA WebLogic Server 2-14 Internationalization Guide Elements of a Locale-Specific Catalog The locale-specific catalogs are subsets of top-level catalogs. They are maintained in subdirectories named for the locales they represent. The elements and attributes described in...
Page 33 - Locale Message Catalog Syntax
Message Catalog Formats Internationalization Guide 2-15 Locale Message Catalog Syntax The following example shows a French translation of a message that is available in ...\msgcat\fr\MyUtilLabels.xml . The translated message appears as shown in Listing 2-4 . Listing 2-4 Example of a Message Translat...
Page 35 - About the Message Editor
Internationalization Guide 3-1 C HAPTER 3 Using the BEA WebLogic Server Message Editor The following sections describe how to use the Message Editor: About the Message Editor Starting the Message Editor Working with Catalogs Adding Messages to Catalogs Finding Messages Using the Message ...
Page 36 - Using the BEA WebLogic Server Message Editor
3 Using the BEA WebLogic Server Message Editor 3-2 Internationalization Guide Note: The Message Editor does not support the editing of localized catalogs. The Message Editor allows you to perform the following tasks: Create XML message catalogs Create and edit messages View all the messages in...
Page 37 - Starting the Message Editor
Starting the Message Editor Internationalization Guide 3-3 Starting the Message Editor Before you start the Message Editor, you should have installed and configured your WebLogic Server system and set your environment variables ( setExamplesEnv.cmd ). Make sure that your classpath is set correctly. ...
Page 38 - Working with Catalogs
3 Using the BEA WebLogic Server Message Editor 3-4 Internationalization Guide Figure 3-1 WebLogic Message Editor for Log Messages Working with Catalogs The following sections describe how to use the Message Editor to manage catalogs: Browsing to an Existing Catalog Creating a New Catalog
Page 41 - Creating a New Catalog
Working with Catalogs Internationalization Guide 3-7 Figure 3-4 WebLogic Message Editor for Simple Messages Creating a New Catalog To create a new catalog, complete the following procedure: 1. Choose the File menu from the main menu bar of the WebLogic Message Editor window. 2. Choose New Catalog . ...
Page 43 - Adding Messages to Catalogs
Adding Messages to Catalogs Internationalization Guide 3-9 Adding Messages to Catalogs The following sections describe how to use the Message Editor to add messages to catalogs: Entering a New Log Message Entering a New Simple Text Message Entering a New Log Message To enter a new message into a...
Page 45 - Entering a New Simple Text Message
Adding Messages to Catalogs Internationalization Guide 3-11 6. Toggle the Display stacktrace option on or off by clicking the checkmark box. Use this option to print a stacktrace along with the message when a Logger method takes an exception as one of its arguments. 7. Click Add . The message is add...
Page 46 - Finding Messages; Finding a Log Message
3 Using the BEA WebLogic Server Message Editor 3-12 Internationalization Guide 5. Enter the Message body text. 6. Click Add. The message is added and the entire catalog is immediately written to disk. Finding Messages The following sections describe how to use the Message Editor to find messages: ...
Page 47 - Finding a Simple Text Message
Finding Messages Internationalization Guide 3-13 5. Enter as much information as you need in the Message text search field to find the correct message. The search for text does a partial match in any of the text fields. 6. Click Find first or Find next . The fields are strung together to find the me...
Page 48 - Using the Message Viewer; Viewing All Messages in a Catalog
3 Using the BEA WebLogic Server Message Editor 3-14 Internationalization Guide Using the Message Viewer 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 secti...
Page 49 - Viewing All Messages in Several Catalogs; Choosing a Message to Edit from the Message Viewer
Using the Message Viewer Internationalization Guide 3-15 Figure 3-10 Message Viewer Viewing All Messages in Several Catalogs 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 catal...
Page 50 - Editing an Existing Message
3 Using the BEA WebLogic Server Message Editor 3-16 Internationalization Guide Editing an Existing Message To edit an existing message, complete the following procedure: 1. Find the message you want to edit, either by using the Search dialog as described in Finding a Log Message and Finding a Simple...
Page 52 - Using the BEA WebLogic Server Internationalization Utilities
4 Using the BEA WebLogic Server Internationalization Utilities 4-2 Internationalization Guide 18ngen Utility —Message catalog parser. Use this utility to generate classes used for localizing text in log messages. l10ngen Utility —Locale-specific message catalog parser. Use this utility to proces...
Page 54 - Syntax; Options
4 Using the BEA WebLogic Server Internationalization Utilities 4-4 Internationalization Guide The output prints the message text in the current locale, with the someVal argument inserted appropriately. 18ngen Utility The i18ngen utility parses message catalogs (XML files) to produce Logger and TextF...
Page 55 - l10ngen Utility
l10ngen Utility Internationalization Guide 4-5 l10ngen Utility The l10ngen utility processes the locale-specific catalogs in directories that are subordinate to the top-level catalogs. Syntax java -classpath <l10n_Classpath> weblogic.i18ntools.l10ngen [options] filelist where <l10n_Classpat...
Page 56 - CatInfo Utility
4 Using the BEA WebLogic Server Internationalization Utilities 4-6 Internationalization Guide Note: Utilities can be run from any directory, but if files are listed on the command line, then their path is relative to the current directory. Options CatInfo Utility This utility generates a listing of ...
Page 59 - About Localizer Classes
Internationalization Guide A-1 A PPENDIX A Localizer Class Reference for BEA WebLogic Server The following sections provide reference information for Localizer classes: About Localizer Classes Localizer Methods Localizer Lookup Class Note: This information on Localizer class methods is provide...
Page 60 - Localizer Class Reference for BEA WebLogic Server; Localizer Methods
A Localizer Class Reference for BEA WebLogic Server A-2 Internationalization Guide Localizer Methods Localizers are extensions to the java.util.ListResourceBundle class. Four additional methods are provided to simplify the access of the localization data in the Localizer . These methods are describe...
Page 61 - Localizer Lookup Class
Localizer Lookup Class Internationalization Guide A-3 The following list shows the severity values that are returned: weblogic.logging.severities.EMERGENCY weblogic.logging.severities.ALERT weblogic.logging.severities.CRITICAL weblogic.logging.severities.ERROR weblogic.logging.severities.W...
Page 63 - About Logger Classes
Internationalization Guide B-1 A PPENDIX B Logger Class Reference for BEA WebLogic Server The following sections provide reference information for Logger classes: About Logger Classes Example of a Generated Logger Class Note: This information on Logger classes is provided as reference of methods...
Page 64 - Logger Class Reference for BEA WebLogic Server; Example of a Generated Logger Class
B Logger Class Reference for BEA WebLogic Server B-2 Internationalization Guide Example of a Generated Logger Class Listing B-1 show an example of a catalog with a single message definition: Listing B-1 Example of Message Catalog <?xml version="1.0" encoding="UTF-8"?><!DOCTY...
Page 73 - About Loggable Objects
Internationalization Guide C-1 A PPENDIX C Loggable Object Reference for BEA WebLogic Server The following sections provide reference information for Loggable objects : About Loggable Objects How Loggable Objects Are Used About Loggable Objects By default, all log message catalogs create Logger ...
Page 74 - Loggable Object Reference for BEA WebLogic Server; How Loggable Objects Are Used
C Loggable Object Reference for BEA WebLogic Server C-2 Internationalization Guide How Loggable Objects Are Used To create a Logger that provides methods to return Loggable objects , you need to set the loggables attribute in the message catalog. For example, consider the test.xml catalog shown in L...
Page 77 - About TextFormatter Classes
Internationalization Guide D-1 A PPENDIX D TextFormatter Class Reference for BEA WebLogic Server The following sections provide reference information for TextFormatter classes: About TextFormatter Classes Example of an Application Using a TextFormatter Class Note: This information on TextFormatt...
Page 78 - TextFormatter Class Reference for BEA WebLogic Server
D TextFormatter Class Reference for BEA WebLogic Server D-2 Internationalization Guide Example of an Application Using a TextFormatter Class Listing 4-3 shows an example of a simple message catalog for the HellowWorld application. Listing 4-3 Example of a Simple Message Catalog <?xml version="...
Page 79 - Example of an Application Using a TextFormatter Class
Example of an Application Using a TextFormatter Class Internationalization Guide D-3 </message> <!-- --> <message messageid="NTH_HELLO" datelastchanged="967575770971" method="nthHello(int count)" > <messagebody> This is hello number {0,number}. </me...
Page 87 - Index
Hybrid Templates for FrameMaker 5.5 I--i Index A argument key A-2message 2-4 C catalog browsing for 3-5context 3-2creating 3-7entering a new log message 3-9entering a simple text message 3-11locale-specific 1-5, 2-3, 2-5message 1-4naming 2-3top-level 2-2, 2-5 CatInfo 4-6character code 3-2class Local...