Change default phone localization

About this task

For the United States (US), the area code is defined in PhoneNumberMetaData.xml to display as three numbers followed by a dash. For example, the area code 202 displays as 202-555-1234. You can change this default display for the US, Canada, and any other NANPA countries defined in this file that rely on the US format. For example, change the default to use parentheses, such as (202) 555-1234, as follows:

Procedure

  1. In Guidewire Studio™, navigate in the Project window to configuration > config > phone and then double-click PhoneNumberMetaData.xml to open the file in the editor.
  2. Find the entry for the United States by searching for:
    territory id="US"
  3. In that element are two numberFormat elements. The second of these elements defines the pattern for parsing that includes an area code. It includes a <format> element that defines the format of the string.
    <numberFormat pattern="(\d{3})(\d{3})(\d{4})">
      <format>$1-$2-$3</format>
  4. Change this <format> element to use parentheses and a space, as follows:
    <format>($1) $2-$3</format>
  5. Open a command prompt from the PolicyCenter installation directory and run the following utility:
    gwb genPhoneMetadata
  6. Restart ClaimCenter to pick up this change.