Navigation:  System Configuration > Configuring Features > Hospitality > Translations >

Translation Types

Previous pageReturn to chapter overviewNext page

Translation types are used when adding translations so that you can add multiple, or a range of, translations without having to manually enter each individual translation.  Once a translation is added to the table, it is essentially a simple one-to-one replacement.  The DV2000/DV4 supports the following translation types.

 

Type

Description

Add value

Adds the modifier value to the room number value to produce the mailbox.

Subtract value

Subtracts the modifier value from the room number value to produce the mailbox.

Add prefix

Adds the modifier to the front of the room number string.

Add suffix

Adds the modifier to the end of the room number string.

Replace with

Replaces the room number string with the modifier string.

Apply mask

Applies the modifier (as a mask) to the room number string to produce the mailbox.

Remove leading zeros

Removes all leading zeros from the room number string to produce the mailbox.

 

Examples

The following table provides an example of each translation type in action, except Mask, which is discussed in the next section.

 

Type

Room #

Modifier

Mailbox #

Add value

101

7000

7101

Subtract value

7101

7000

101

Add prefix

101

7

7101

Add suffix

101

0

1010

Replace with

101

8500

8500

Remove leading zeros

00101

Not used

101

 

For examples on using the Apply mask type, see below.

 

Apply Mask

Uses the modifier string as a mask for converting the Room Number string into the final result.  The mask string is interpreted according to the following rules:

 

Character

Means

*

Copy the next digit to the mailbox string no matter what it is.

^

Skip over and discard the next digit in the room number string.

0-9

Any number in the mask string is copied as-is to the mailbox string.  The room number string is not affected in this case.

 

The mask is interpreted left-to-right, one character at a time.  Each instance of the * character copies a single digit from the room number (source) string to the mailbox (result) string, again working left-to-right.  Likewise, each ^ character in the mask will discard the next character in the room number string, again proceeding from left-to-right order.  Finally, any actual digit 0-9 that appears in the mask will be copied directly to the end of the mailbox string.

 

This translation type is the most complicated and, therefore, the most prone to being misconfigured.  Consequently, it is recommended that you always use one of the other translation types unless you really need the flexibility that the Apply mask type offers.

 

Examples

The following table provides a selection of examples using the mask translation type.

 

Room #

Modifier (Mask)

Mailbox #

Comments

7110

***

711

The asterisk symbol copies the next digit from the room number string to the maibox string.  It only copies one digit.

 

So, in this example, the mask *** copies the first three digits only.  The last digit is discarded.

7110

^***

110

The caret symbol skips over and discards the next digit in the room number string.  Only the one digit is discarded and nothing is copied to the mailbox string.

 

So, in this example, the mask ^*** throws out the first digit, 7, and copies over the next three, 110.

101

8***

8101

A number in the mask is copied over as-is to the mailbox string.

 

So, in this example, the 8 is copied to the result string and then the *** part of the mask copies the three digits from the source string to the result string.

201

70^**

7001

In this example, the '70' from the mask is copied to the mailbox sting first, then the '1' from '201' is discarded, and finally the '01' is copied to the result.

 

Expanded Example

To better understand how the mask string and room number string are processed together to create the mailbox number string, let's consider a more complex (if unlikely) example.

 

First, the translation in summary form:

 

Room Number

Modifier (Mask)

Mailbox Number

7101101

^^^8****

81101

 

Now, consider the steps used to arrive at the above result.  In each step, the mask digit and the room number digit being processed are both in bold, red type.  To make it even more clear, the digit in question is also shown enclosed in square brackets, like so: [^]

 

Step

Description

Mask

Room Number

Mailbox Number

1

Apply first ^ to first digit in room number.  Since ^ means discard, the mailbox number is unchanged.

[^]^^8****

[7]101101

 

2

Apply second ^ to the second digit in the room number.

^[^]^8****

7[1]01101

 

3

Apply third ^ to the third digit in the room number.

^^[^]8****

71[0]1101

 

4

Copy the 8 directly to the end of the mailbox number.  Since the mailbox number is currently empty, the 8 becomes the first digit.

 

No digits in the room number are copied or discarded in this case, so the next step will address the 4th digit, not the fifth.

^^^[8]****

(ignored)

8

5

Apply the first * to the fourth digit of the room number.  Since * means copy, the digit 1 is copied to the end of the mailbox number.

^^^8[*]***

710[1]101

81

6

Apply the second * to the fifth digit of the room number.

^^^8*[*]**

7101[1]01

811

7

Apply the third * to the sixth digit of the room number.

^^^8**[*]*

71011[0]1

8110

8

Apply the last * to the last digit of the room number.

 

We have reached the end of the mask, so the final mailbox number is 81101.

^^^8***[*]

710110[1]

81101