Variables
A variable is a word or phrase that the translation memory (TM) recognizes in the source text. The TM copies the variable to the target text. Because variables are identical between source and target text, they are useful for special terms such as product names. Variables are recognized tokens and also a language resource.
- The TM contains a translation unit (TU) that matches the source (though the variable might differ).
- The TM does not contain a translation unit (TU) that matches the source text.
Scenario 1: The TM contains a matching TU
The TM contains a matching TU, but the variables in the text and the TU might differ. In this case, the TM copies the target language text from the TU to the target of the translatable item and substitutes the variable from the presented text with the variable from the TU.
Scenario 2: The TM does not contain a matching TU
If there is no match, the TM does not translate the segment. However, the TM recognizes the presence of the variable in the source and adds an annotation to the working text file. When you open the text, the editor displays the variable text as a recognized token.
Theoretically, you can use any character in a variable. However, a translation memory (TM) segments text before it checks for variables, so you should not use any character that might cause a segment break in variables. For example, you would normally not use a period, colon, semicolon or question mark in a variable. Also, although you can have spaces within a variable, do not start or end a variable with a space.
For most languages, a variable must be followed by a punctuation mark or a space (or other white space character), so that a TM can recognize the variable in source text. However, this is not the case for languages which do not use blanks to separate words, such as Japanese, Chinese or Thai.
- The TM contains the following variables: Mary Brown and John Smith.
- A TM entry contains the source language text: Mary Brown works here.
- The source text presented for translation is: John Smith works here.