WebLogic Server 6.1 Code Examples, BEA Systems, Inc.

Package examples.i18n.simple

This example shows various ways of internationalizing an application using simple message catalogs.

See:
          Description

Class Summary
HelloWorld This example shows various ways of internationalizing an application using simple message catalogs.
 

Package examples.i18n.simple Description

This example shows various ways of internationalizing an application using simple message catalogs. Using any of the languages supported by this example requires the appropriate operating system localization software and character encodings. The package that contains this example is:

java examples.i18n.simple.HelloWorld [lang [country]]

where lang is a two-character ISO language code (for example, en for English) and country is a two-character ISO country code (for example, US for the United States).

Catalogs included with this example are English (the default) and French. The catalog source files can be found here:

English(default)             ../msgcat/Helloworld.xml
French                       ../msgcat/fr/FR/HelloWorld.xml
The following sections describe how to build, configure, and display the example.
  1. Build the example
  2. Configure the server
  3. Display the example

Build the example

  1. Set up your development shell as described in Setting up your environment.

    We provide a build script for you to build the example, called build.xml.

  2. Run the build script using the following Java ant command:
            $ ant
  3. The script builds the example and places the files in the correct locations in your WebLogic Server distribution.

Configure the server

CLIENT_CLASSES must be set up and needs to be in the CLASSPATH when running the example.

Display the example

The catalogs used in this example were built using the Message Editor catalog editing utility (weblogic.i18ntools.gui.MessageEditor). Use the Message Editor to display the internationalized text that is built for this example. To start the Message Editor:

java weblogic.i18ntools.gui.MessageEditor


Documentation is available at
http://e-docs.bea.com/wls/docs61

Copyright © 2001 BEA Systems, Inc. All Rights Reserved.