PSML resources may also be optionally localised. PSML Resources are localized by placing them in sub-directories based on language and country code abbreviations. The language-code sub-directory contains one or more country-code subdirectories.
The language-code directory name is specified with an ISO-639 standard two-character language abbreviation. The country-code subdirectory is optional, and is specified with an IS0-3166 standard two-character country code abbreviation.
user |-- david |-- html |-- fr // french language |-- FR // France country-code |-- BE // Belgium country-code
NOTE: The country codes must be in upper-case
For a given locale of fr_FR, the search order for the default accounting resource would be:
groups/accounting/html/fr/FR/default.psml groups/accounting/html/fr/default.psml groups/accounting/html/default.psml groups/accounting/default.psml
The Jetspeed profiler looks at the "Content Language" HTML header for locale specific settings. If there are multiple settings, all settings will be searched until the first resource is found. (This is currently not supported)
For a complete list of ISO-639 standard language abbreviations, see:
For a complete list of ISO-3166 standard country code abbreviations, see:
In the JetspeedResources.properties.merge, you can enable or disable the usage of language and country codes during PSML resource resolution with the following settings. In the tutorial we choose to turn off both language and country code fallback.
# Consider the language as part of the fallback? services.Profiler.fallback.language=false # Consider the country code as part of the fallback? services.Profiler.fallback.country=false