Currency formats in a single currency implementation
When PolicyCenter is in single currency mode, all monetary amounts are in the same currency. PolicyCenter uses the localization_localeCode.xml file corresponding to the region selected by the user to format monetary amounts. If there is no localization_localeCode.xml file corresponding to the chosen region, PolicyCenter uses the default locale’s localization_localeCode.xml file. The localization files can be accessed in Guidewire Studio from Project window to .
In the base configuration, the localization_en_US.xml, localization_fr_FR.xml, and localization_ja_JP.xml files define regional formats customary to each region. However, the only file with currency format overrides is the localization_en_US.xml file. This is because the base configuration is set to single currency mode and uses US dollars as the default currency.
In general, PolicyCenter shows currency data using the settings specified by the ICU Library. However, if you want use a different set of currency formats, you can override the ICU Library settings.
The <CurrencyFormat> attributes that you can override include:
negativePattern- How PolicyCenter displays negative monetary amounts. PolicyCenter displays and formats the numeric value in place of the pound sign (#) in the pattern. PolicyCenter displays all other characters in the pattern as listed without modification.- For example, the negative pattern ($#) displays the numeric value -32 as ($32.00).
positivePattern- How PolicyCenter displays positive monetary amounts. PolicyCenter displays and formats the numeric value in place of the pound sign (#) in the pattern. PolicyCenter displays all other characters in the pattern as listed without modification.- For example, the positive pattern $# displays the numeric value 32 as $32.00.
zeroValue- How PolicyCenter displays zero amounts. For example, the zero value patttern can be 0 (zero) or - (dash). If the numeric value of a monetary amount is null, PolicyCenter displays the amount as empty or blank. The monetary amount must be a non-null 0.00 amount for the zero value pattern to be used.- For example, the zeroValue - displays the numeric value 0 as -.
The localization_en_US.xml file contains these overrides:
<Localization xmlns="http://guidewire.com/localization">
<GWLocale code="en_US" name="English (US)" typecode="en_US">
...
<CurrencyFormat negativePattern="($#)" positivePattern="$#" zeroValue="-"/>
</GWLocale>
</Localization>
Create currency format overrides in a single currency implementation
About this task
Procedure
- In Guidewire Studio™, navigate to .
- Right-click Localizations and select .
-
Name the file
localization_xx_XX.xml, where:- xx is the lowercase version of the language code. For example, en.
- XX is the uppercase version of region code. For example, US.
- Open the existing localization_en_US.xml file. Copy the contents of this file into the new file.
-
Modify the information in the
<GWLocale>element to match the new locale. -
Modify the
<CurrencyFormat>element to specify the desired currency format overrides. - Remove the remaining elements from the file as needed.
