Defining Phone Formats

Use the Define Phone Formats window to set up phone formats for parsing and displaying phone numbers. This window lets you define country-specific components of phone numbers, display format styles, and area codes. You can also specify country-specific mobile prefixes to determine if a phone number is mobile or not.

To display the phone number based on the phone formats that you define in this window, a user interface must call the parsing routine of the Phone Number Parsing API and the display routine of the Phone Number Formatting API. Parsing occurs only if the territory code is always specified as an input parameter for the Phone Number Parsing API. See:

In the Define Phone Formats window, you must set up phone formats for each country that you enter phone numbers for. The Phone Number Parsing API uses the phone formats to correctly parse phone numbers into these segments: phone country code, area code, and subscriber number. Phone formats also determine the correct format style for displaying phone numbers in user interfaces.

For example, for the US phone format, you define the phone country code as 01, the fixed area code as three numbers in length, the subscriber number as seven digits in length, and the format style as 999-999-9999. The Phone Number Parsing and Phone Number Formatting APIs parse and format phone numbers accordingly into three components. 1234567890 would be 01 phone country code, 123 area code, and 456-7890 subscriber number, and display as 123-456-7890.

To define phone formats:

  1. Navigate to the Define Phone Formats window.

  2. Query the two-letter country code for the country that you want to define phone formats for.

  3. Enter country-specific phone information:

  4. Define phone format styles in the Formats tabbed region:

  5. Define area codes that you want to use for this country in the Area Codes tabbed region.

  6. Define mobile prefixes that you want to use for this country in the Mobile Prefixes tabbed region.

    Mobile prefixes contain the area code and possible prefixes of the subscriber number. For example, the mobile prefix of 650506 consists of the 650 area code and the 506 subscriber number prefix.

    Note: Mobile prefixes work only in countries where subscriber prefixes are based on area codes.

Related Topics