#
JavaHelpTM 1.0 - Localization

## Copyright 1998-1999 Sun Microsystems

## A Network Environment

JavaHelp follows the standard localization conventions used for ResourceBundle.getBundle(). In a networked environment, each such query may require a number of requests across a network to determine the desired bundle for a given Locale. JavaHelp is designed so that only one such search is required to locate the HelpSet file. All other information is obtained by simple requests that start from this file.

Although the HelpSet file is localized following the same naming conventions as with Java Property Resource Bundle, for technical reasons they are not property files. Instead, the method `HelptSet.getHelpSet()` is used.

An invocation of `HelpSet.getHelpSet(name, locale)` invokes `HelpUtilities.getLocalizedResource()`. `HelpUtitities.getLocalizedResource()` eventually calls into `ClassLoader.getResource()` with resource names that are based on the name passed and on the Desired locale and the Default locale.

If the first argument to `getHelpSet()` is "name", the search is conducted in the order shown below (from most specific to least specific). The extension is fixed to be "`.hs`":

        name_language_country_variant.hs
        name_language_country.hs
        name_language
        name
        name_defaultlanguage_defaultcountry_defaultvariant
        name_defaultlanguage_defaultcountry
        name_defaultlanguage

This search order is the one used for `ResourceBundle`, where it is not exposed. It is captured and exposed in `HelpUtilities.getCandidates()`.

## Localized Documents

The HTML viewers are required to support localization as specified by the W3C HTML 4.0 standard.

## Full Text Search

Java uses Unicode internally and it is well suited to internationalization and localization. One specific requirement is that the search code be able to deal with documents that are written in both English and another language. This combination occurs often when some documents have been translated but others have not.

## More Details

The "Localizing Help Information" section of the JavaHelp User's Guide describes the localization process in detail.

JavaHelpTM 1.0
Send your comments to javahelp-comments@eng.sun.com
Last modified: Mon Apr 12 16:46:01 MDT 1999