About Arbortext Styler > Adding Generated Text > Maintaining Translations of Generated Text > XLIFF Files
An XLIFF file (type .xlf) is generated for each selected target language when exporting generated text. A brief explanation of its content is given below:
XLIFF file layout
<?xml version="1.0"?>
<xliff version="1.2" xmlns="urn:oasis:names:tc:xliff:document:1.2">
<file datatype="xsl" date="2010-02-25T12:04:06Z" original="axdocbook.style"
source-language="en" target-language="fr">
{ multiple trans-unit elements here }
<file datatype="xsl" date="2010-02-25T12:04:06Z" original="axdocbook-module.style"
source-language="en" target-language="fr">
{ multiple trans-unit elements here }
One for each stylesheet module
The date of the XLIFF file was produced, i.e. when the generated text was exported for translation
The name of the stylesheet module
Extracted from the Source Language field of the Stylesheet Properties dialog box
Extracted from the Target Languages field of the Stylesheet Properties dialog box and selected in the Languages to export field of the Export Generated Text for Translation dialog box
Contains the translation units in the file, described in trans-unit elements
One for each translation unit (piece of generated text) marked as needing translation in the stylesheet
Content of a translation unit in an XLIFF file
The description of a translation unit in the stylesheet is given in a trans-unit element in the XLIFF file. A summary of the content of a trans-unit is given below:
<trans-unit id="A10dffbd7-de49-46c5-a657-82e2594945e3">
<source>{1}{2} (continued){1}}</source>
<target state="new">{1}{2} (continued){1}</target>
This note has been entered by the user to give context to the translator.
<context-group purpose="information">
<context context-type="numparams">2</context>
<context context-type="paramnotes">{1} = <_ufe:table-title-continuation>...</_ufe:table-title-continuation></context>
<context context-type="paramnotes">{2} = <_gte:ElementContent/></context>
<context context-type="x-def-name">title in table</context>
<context context-type="x-location">Repeating Title at Top</context>
The unique ID of the trans-unit in the XLIFF file. This matches the ID of the translation unit in the stylesheet.Arbortext Styler will match the two IDs when it imports the translated XLIFF file to place the translation into the correct translation unit.
The content of the source translation unit. Markup in the original generated text is replaced with parameter markers. Descriptions of the parameters that represent the markup are described in the context context-type=”paramnotes” entries later in the XLIFF file.
The translation of the generated text content. For elements that have not been previously translated, the entry for target is the same as for source.
The state attribute describes the current position of the translation unit in the translation workflow. It will be one of the following values:
new - has not yet been translated
needs-translation - has been translated previously, but needs a new translation as the content of the source translation unit has changed since the last import of translations
translated - has been translated and is current
The translator should enter the translation into this field before passing the XLIFF file back to the stylesheet developer for import into the stylesheet. Please refer to Guidelines for working with XLIFF files below for some additional information.
The note created for the translation unit in the stylesheet.
See Adding Notes to the Translator.
Information about the context to which the generated text applies. This information can be used by the translator to give context to the required translation. It can also be used by memory by translation software that manages translation memory.
The information is listed in a set of context elements.
A piece of information about the context of the generated text. There will be multiple child context elements for each trans-unit.
Each context includes a context-type attribute, which defines the type of information the context element is describing. It will be one of the following values:
numparams - the number of pieces of markup identified for the generated text in the source.
paramnotes - the type of markup
x-def-name - the element in the stylesheet that generated this translation unit
x-location - the location in the stylesheet from which this translation comes
The XLIFF file contains further information about all these attribute values. Refer to the comments at the beginning of the file.
Guidelines for working with XLIFF files
Please refer to the list below for information that you must take into consideration when working with XLIFF files:
Arbortext Styler will usually recognize if a translation has changed when the XLIFF file is imported. It does not always need to refer to the value of the state attribute for target, although occasionally it may need to prompt for clarification of next steps. Setting the state attribute to a value of translated, signed-off, or final before import will avoid uncertainty.
Do not change the content of source elements in XLIFF files. Arbortext Styler will not be able to match the translation in the XLIFF file with the translation unit in the stylesheet.
You must only enter a translation in the target element for the relevant translation unit. Do not use any other part of the XLIFF file for translation information.
Do not delete or change the parameter markers for the target element. They must remain the same as shown in the source element to allow Arbortext Styler to match the translations with their source in the stylesheet. You are permitted to change the order of the markers in the target element.
Parameter markers that originate from tag pairs must also have both start and end markers in the translation.
For example, {1} Inside {1} cannot be translated as {1} --inside--. It must be translated as {1} --inside--{1} to enable correct matching with its stylesheet source.
Parameter markers that originate from tag pairs must be nested properly.
For example, {1} start {2} middle {2} end {1} cannot be translated as {1} xstart {2} xmiddle {1} xend {2}. Tag pairs are not permitted to overlap in this manner.