Sun GlassFish Web Space Server 10.0 Administration Guide

Precedence Hierarchy for Language.properties Files

Language and display information is defined in the Language.properties, as well as various other Language_LanguageCode.properties files for foreign languages. When you extract the portal-impl.jar file, these files are placed in the content folder. Language.properties is the primary and default language definition file, but definitions in that file may be overridden by language-specific definitions. For example, the file Language_en.properties contains the English versions of most of the definitions, the file Language_fr.properties contains the French version, and so on.

Language files can further have locale-specific definitions. The Language_en_US.properties file contains English phrase variations further defined for the United States. Other languages can also have locale-specific definitions.

Rules of Precedence

    The hierarchy of precedence for different Language.properties files is:

  1. Language-ext.properties takes precedence over Language.properties.

  2. Language-specific versions take precedence over the non language-specific versions. For example, Language_en.properties takes precedence over Language.properties.

  3. Location-specific versions take precedence over the non location-specific versions. For example, Language_en_US.properties takes precedence over Language_en.properties.

    For the Language.properties file for English, Language-ext_en_US.properties has the highest precedence and the Language.properties file has the least precedence. The hierarchy is:

  1. Language-ext_en_US.properties

  2. Language_en_US.properties

  3. Language-ext_en.properties

  4. Language_en.properties

  5. Language-ext.properties

  6. Language.properties