Set keyboard shortcut for Imperial Era

In working with the Japanese Imperial Calendar inputs, you can use a keyboard shortcut to select the Imperial Era.

About this task

Entering the first character of the English translation of the Japanese Imperial Calendar (JIC) era selects that era in the JIC date input field. For example, entering H as soon as the date input receives focus automatically selects the Heisei Era. In a similar fashion, entering R in the data input field automatically selects the Reiwa Era.

You must configure this functionality by adding a <JapaneseImperialDateFormat> element to localization file localization_en_US.xml.

Procedure

  1. In the Guidewire Studio Project window, navigate to the following location and open file localization_en_US.xml:
    • configuration > config > Localization
  2. Inside the <GWLocale> element, starting on a new line immediately after the last item in the group, add a <JapaneseImperialDateFormat> element, for example:
    <GWLocale code="en_US" name="United States (English)" typecode="en_US">
            <DateFormat long="E, MMM d, yyyy" medium="MMM d, yyyy" short="MM/dd/yyyy"/>
            <TimeFormat long="h:mm:ss a z" medium="hh:mm:ss a" short="h:mm a"/>
            <NumberFormat decimalSymbol="." thousandsSymbol=","/>
            <CurrencyFormat negativePattern="($#)" positivePattern="$#" zeroValue="-"/>
            <JapaneseImperialDateFormat
              long=""
              medium=""
              short=""
             />
        </GWLocale>
    See localization file localization_ja_JP.xml for an example of what to enter for the element attributes. These three element attributes are required.
  3. Save your work.

What to do next

You must stop and restart the application server for this change to take effect.