- 30 Jan 2024
- 2 Minutes To Read
-
Print
-
DarkLight
-
PDF
Update the XLIFF language file with the translated content
- Updated On 30 Jan 2024
- 2 Minutes To Read
-
Print
-
DarkLight
-
PDF
Whatfix’s XLIFF language file has a fixed structure representing your content and its details. While it's useful to grasp the general XLIFF file structure and the structure of Whatfix's language file, translators need not be concerned about the complete file structure. To update the language file correctly:
- Identify the text inside the source tags.
- Insert the translation of that text within the corresponding target tag.
However, if you're interested in learning about the basics of the XLIFF file format or the structure of Whatfix's XLIFF language file, see the following information:
An XLIFF file comprises tags and attributes. Tags structure the file, while attributes provide additional information to a specific tag.
Tags are enclosed within angle brackets (‘<’, ‘>’). Tags come in pairs, with each tag having an opening tag and a closing tag.
The following is an example of a pair of unit tags:
<unit></unit>
Here, unit is the opening tag, and /unit is the closing tag.
Tags located between another opening and closing tag are considered to be nested inside that tag. Here's an example of a segment tag nested within a unit tag:
<unit>
<segment>
</segment>
</unit>
Attributes of a tag are specified within its opening tag and are assigned a value. Here's an example of a unit tag with the name attribute having the value "My unit’s name":
<unit name="My unit's name">
<segment>
</segment>
</unit>
The XLIFF language file includes 4 main tags, each representing different parts of Whatfix content.
<file id="whatfix_translation">
<group id="whatfix">
<unit id="content_id" name="content_name" type="content_type">
<segment id="field_id">
<source>Text in the default language</source>
<target></target>
</segment>
...
</unit>
</group>
</file>
-
A unit tag represents a single piece of Whatfix content and contains the following attributes:
- id: The ID of the field.
- name: The name of your content.
- type: The content type of your Whatfix content.
-
Nested within a unit tag are segment tags, representing different fields of the content specified in the unit tag. For instance, a Flow contains a title field and fields for its individual steps. These tags include the following attributes:
- id: The ID of the field.
-
Each segment tag comprises a source and a target tag.
- Within the source tag, you'll find the text of the field specified in the segment. This text is in the default language of your Dashboard.
- The target tag is left empty for the translator to enter the translation of the text inside the source tag before it.
Translate the content in the XLIFF language file
Use the following steps to update the XLIFF language file:
Ensure to download the XLIFF language file from the Dashboard first.
- Unzip the downloaded folder and open the extracted folder.
- Depending on your requirements, open either the Full.xlf file containing all content or the Delta.xlf file with only outdated content.
- Update each target tag with the translation of the text within the preceding source tag.
- Save the language file.
Once you've made the necessary updates to the language file, remember to upload it on the Dashboard. This ensures that the translations take effect on the Dashboard.