XML Elements - Variable assignments

Author-it XML Format for Translation

Variables are used to substitute text at the time of publishing. They can be used in many publishable fields such as Book or Topic descriptions, Topic text and Hypertext links. They work by looking for specific text (for example <customer>) and replacing it with a variable assignment (for example My Customer). A variable must have been created within the Author-it Administrator for this to work and it may optionally have variable assignments on one or more objects.

Translators should be aware that text enclosed in <> may have special meaning and should be provided with rules to deal with each situation. Often, the variable assignment and the variable occur in different objects. For example, a Book may contain the variable assignment <

Objects with variable assignments against them will have a VariableAssignments section which contains one or more VariableAssignment records. These records in turn contain two parts:

Data with the following elements should be translated:

Value

This is the value that will be substituted into the object at the time of publishing

Data with the following elements should not be translated:

Hidden

The Hidden element determines whether the variable will be hidden in the Editor user interface.
For the translated XML to succeed, the values of true and false should not be translated, and should be used only in lowercase.

XML sample: <Hidden>false</Hidden>

Data with the following attributes should not be translated:

ID

The Variable ID.

Name

The name of the variable that this variable assignment relates to.

ValueObject

The ID of the file object to be used

Style

The ID of the style object to be applied

Example

<VariableAssignments>
<VariableAssignment>
<ID>17</ID>
<Name><
<Value>Optical Systems Corporation Limited</Value>
<ValueObject>0</ValueObject>
<Style>-1</Style>
</VariableAssignment>
</VariableAssignments>

Variables will be handled in one of two ways:

  • Variable assignment is translated. Within the object containing a variable (for example "The <
  • Variable is removed from text. Within the object containing a variable (for example "Select a <color> from the dialog") the variable should be removed and replaced with translated text. This is because the variable <

Note: It is unlikely that it is appropriate for the variable name within a topic to be translated as this will just create a new (unresolved) variable. What to do with variables within the Topic text should be discussed with the Author-it administrator on a case by case basis.