Email this Page Log Support Call Send Feedback Print

Previous Topic

Next Topic

Book Contents

Book Index

XML Elements - Variable Assignments

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 exist be created within the AuthorIT 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 <customer> = "ACME" while a Topic contains the text "Prepared for <customer>".

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 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></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 <my_product> help has been produced for <customer>") the variables themselves will remain untranslated. This is because the variable will be used to substitute in a variable assignment and the variable assignment is the part that requires translating.
  • 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 <color> is being used to substitute either the word "color" (for the US market) or "colour" (for the UK market).

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.

In This Section

An example of preserving variables in translated text

An example of removing variables from translated text

See Also

Author-it XML Format (for Translation)

XML for Translators

Translating with SDLx

XML Elements - All Objects

XML Elements - Book Object

XML Elements - File Object

XML Elements - Glossary Object

XML Elements - Hyperlink Object

XML Elements - Index Object

XML Elements - Index Entry Object

XML Elements - Table of Contents Object

XML Elements - Table of Figures Object

XML Elements - Topic Object

Top of Page Email this Page Log Support Call Send Feedback Print