Previous | Next | Trail Map | Writing Global Programs | Internationalizing an Existing Program: Step by Step

Step 1: Identify the Locale-Sensitive Areas

The following locale-sensitive areas of the WordMatch program were identified in Common Problems with Global Programs:
  1. The words (lips, Java, television, dog, and so on).
  2. The corresponding sounds.
  3. The list of languages.
  4. The status messages that appear at the bottom of the window.
  5. The Score button title.
The page then went on to highlight the following list of problems that you would encounter if you attempted to internationalize those locale-sensitive items. The problems are listed here:
  1. Identifying the User's
  2. Locale-Sensitive Data
  3. Data Formatting
  4. Sortable Lists
  5. Non-Roman Alphabets
However interesting, this list is not complete. The common problems page focused on problems that can be solved by the classes in the JDK 1.1 release and the WordMatch presents a couple of other issues that cannot be solved by classes in the JDK 1.1. These are presented here.

Issue One: Content vs. Operation

You should note that the items in the list of locale-sensitive areas in the WordMatchp program falls into two categories: applet content and applet operation.

The first two items in the list, the list of words and the the corresponding sounds, are applet content. These items don't change in relation to the locale of the user--a user wants English words when the English language is selected regardless of whether the user is French, Japanese, or Russian. The words and sounds do change when a user chooses a new language from the language list. Thus, technically speaking, these items don't need to be localized. However, the programmer can take advantage of Locales and ResourceBundles to manage this data.

The other three items, the language list, status messages, and button title, are part of the applet's operation and do change in relation to the locale of the user. A user would prefer all of this information to appear in his or her language. Thus this information should be localized. Also, the initially selected language should be based on the user's locale.

So, the set of languages that the applet supports for its content and the languages that it supports for its operation may be completely different. This is an important distinction and you will want to keep this in mind for your own programs.

Issue Two: Applet Tag Parameters

The WordMatch applet uses <APPLET> tag parameters to specify the language list and the word list. The program was designed this way to make is easier for end users to add languages and words to the applet without re-compiling it.

As pointed out in Issue One, the word list isn't part of the applet's operation and thus, doesn't need to be localized. However, the languages should be localized (the language names should appear in the user's language). But you cannot localize information in an .html file--it must be done in Java code. Thus you shouldn't require locale-sensitive information in your applet parameters.

Previous | Next | Trail Map | Writing Global Programs | Internationalizing an Existing Program: Step by Step