Reason

Inserting XLIFF files in Catalyst will parse Memo and Context information and respectively insert the contents in the Memo and Context fields of the associated translatable string. This article references the expected syntax in the XLIFF file for this metadata to parse into your TTK projects.

An XLIFF sample file is available in the "Samples\Context Links" directory created when you download Catalyst 10 installer and extract the files locally.
Extracting the build will create a Catalyst10_Installer folder with all the installation files. Inside, you will find Samples\Context Links\Xliff with embedded Links.xliff

 

Memos from and to XLIFF files

Alchemy Catalyst parses the <note> element and stores it in the memo field of the associated localisable string.

For example, the following translation unit inserted in Catalyst

<trans-unit id="130">

<source>Align left</source>

<target>Align left</target>

<note>See context link auto applied here</note>

<context-group name="images">

<context context-type="x-reference">https://www.alchemysoftware.com/demofiles/context_links/left.jpg</context>

</context-group>

</trans-unit>

will result in the Memo "See context link auto applied here" added to the "Align left" sting. In the string list the memo icon and the memo can be visualised:

The memo itself can be edited in the Properties tab on the right of the Translator Toolbar:

 

Memos added to a translatable string in Catalyst will be added to the XLIFF file on extraction of the translated file. There is no requirement for the string to have the <note> element in the original source file.

 

Context information from and to XLIFF files

With Catalyst 10, you can insert Context information from XLIFF files. The XLIFF Standard specification supports the <context> element for context information. It however does not support contextual information in the form of a path or URL. The Standard allows for User defined values which can be created with the prefix "x-". Using this syntax Catalyst 10 parses the <context context-type="x-reference"> element  and populates the context (or path) information for the related string. The <context> element must be nested in a <context-group> element.
Any other context-type attribute will not be parsed and left untouched as it will not be exposed for translation.

For example, the following translation unit inserted in Catalyst

<trans-unit id="130">

<source>Align left</source>

<target>Align left</target>

<note>See context link auto applied here</note>

<context-group name="images">

<context context-type="x-reference">https://www.alchemysoftware.com/demofiles/context_links/left.jpg</context>

</context-group>

</trans-unit>

will result in the Memo "https://www.alchemysoftware.com/demofiles/context_links/left.jpg" added to the "Align left" sting.

The Context info can be visualised in the string list and in the Reference browser:

 The Context can be edited in the Properties tab on the right of the Translator Toolbar:

 

Context paths added to a translatable string in Catalyst will be added to the XLIFF file on extraction of the translated file. There is no requirement for the string to have the <context-group> element in the original source file.

 

Related topics

 

Products or Versions Affected

  • Alchemy CATALYST 10 and greater

 

Last updated with Catalyst 10