About language fallback

Guidewire PolicyCenter uses a language fallback hierarchy for display languages. The fallback mechanism:
  • Orders the set of language property files into a strict hierarchy.
  • Uses language and locale codes in the property file names to indicate the fallback hierarchy.

In general, you enable a language and set it as the primary display language, and, if necessary, add a display key property file and a typelist property file for that language. When you run the application, language fallback occurs for display keys and typecode keys that are missing.

Thus, language fallback means that if a display key or typelist key is not available in the user's preferred language, PolicyCenter uses the keys defined in the next property file in the hierarchy, if there is one. For example, display_fr_CA.properties falls back to display_fr.properties, which, in turn, falls back to the base language defined in display.properties.

Language fallback always applies to the user's preferred language. For example, if, in addition to Canadian French, you enable Spanish for PolicyCenter, a user can change the preferred language from Canadian French to Spanish. For that user, if a display key is missing for Spanish, the language falls back to the language defined in display.properties, which, in the default configuration, is U.S. English.

Note: Setting the primary display language in configuration parameter DefaultApplicationLanguage does not cause that language to become a fallback for any other language. Setting the primary display language affects only the default preferred language for users. A user always has a preferred language. The default for that preferred language is the language defined as the primary display language.

Example fallback for French localization

In the base configuration, Guidewire provides standard French display key and typelist property files:
  • display_fr.properties
  • typelist_fr.properties
However, suppose that you want Canadian French to be the language that users see when they log into PolicyCenter. To accomplish this task, you need to perform the following work flow.
  1. Define the French Canadian display keys that differ from standard French in file display_fr_CA.properties, located in the following Studio directory:
    • configuration > config > Localizations > Resource Bundle 'display'
  2. Define the French Canadian typecode keys that differ from standard French in file typelist_fr_CA.properties, located in the following Studio directory:
    • configuration > config > Localizations > Resource Bundle 'typelist'
  3. Enable a French Canadian language option by adding the following entry to file LanguageType.ttx, located in the following Studio directory:
    • configuration > config > Extensions > typelist
    • <typecode code="fr_CA" desc="Français Canadien" name="Français Canadien"/>
  4. Set configuration parameter DefaultApplicationLanguage to fr_CA in file config.xml.
  5. Restart the application server to enable these changes in Guidewire PolicyCenter.

Thereafter, whenever a user logs into PolicyCenter, the user sees Canadian French as the default language, unless the user, at some point, changes the preferred display language to a different enabled language in PolicyCenter.

For a user who is using Canadian French, if PolicyCenter cannot find a Canadian French display key for an element in the user interface, the display language falls back first to the definition for French in display_fr.properties. If this file cannot provide a value for the display key, the display language falls back to the definition in display.properties. The same happens for typecode keys.

Synchronizing language property files

In the base configuration of PolicyCenter, Guidewire provides U.S. English as the default language defined in files display.properties and typelist.properties. However, if you do not intend to use U.S. English as an available language in PolicyCenter, it is not necessary to maintain these files in synchronization with additional language display keys and typecodes that you add to other language files. You are free to do so, but Guidewire does not require it.