Translation Rules

The translation rules subelement is where the actual translation rules are created. The fields within this element specify the type of translation to be performed, the addition or deletion to be made, and where in the address that change takes place. Translations are not applied to any realm or session agent in this element.

When creating translation rules, first determine the type of translation to perform. The following table lists and describes the three types of number translations.

Field Value Description
add This translation type adds a character or string of characters to the address.
delete This translation type deletes a character or string of characters from the address.
replace This translation type replaces a character or string of characters within the address. Replace works by first applying the delete parameter then by applying the add parameter.

After you set the translation type, you define the string to add or delete. The wildcard term for a string to delete is the at-sign, @. Finally, you specify the character position in the address to make the addition or deletion.

The character position where an add or delete occurs is called an index. The index starts at 0 (immediately before the leftmost character) and increases by 1 for every position to the right you move. In order to specify the final position in an address, use the dollar-sign, $.

To create a translation rule that deletes a string:

Translation Rules for Deleting Strings

To create a translation rule that deletes a string:

  1. Enter a descriptive name for this translation in the ID field.
  2. If you are deleting a specific string, enter it in the delete string field.
  3. If you are deleting a portion of the address string, enter the index number in the delete index field. For this type of deletion, remember to enter the number of characters you are deleting in the form of at-signs @ in the delete string field.

    The first matched string will be deleted, any remaining strings that match will remain. For example, if the address is 187521865 and the string to delete is “18,” only the first instance of 18 will be deleted. The second instance will remain after translation.

Translation Rules for Adding Strings

To create a translation rule that adds a string:

  1. Enter a descriptive name for this translation in the ID field.
  2. Enter the string you want to add in the add string field.
  3. Enter the index of the string insertion in the add-index parameter. If you want to add a string at the end of an number, enter a dollar-sign $ in the add index field.

Translation Rules for Replacing Strings

To create a translation rule that replaces a string:

Note:

A string replacement involves deleting a string followed by adding a string in the removed string’s place. The index is not used when replacing a string.
  1. Enter a descriptive name for this translation in the ID field.
  2. Enter the string you want to delete in the delete string field.
  3. Enter the string you want to add in the add string field.