Skip to main content
Skip table of contents

XLIFF Status Handling

XLIFF documents are the industry standard for exchanging translatable text and localization-related data across different localization tools. XLIFF files consist of translation units that appear as tags:

<trans-unit>
...
</trans-unit>

Within each translation unit is a source/target segment pair, where the target segment can be empty or populated depending on whether the segment has been translated.

The benefit of XLIFF files is that they can contain additional information beyond the source and target text, making it easy to pass all the necessary information about each segment between different localization tools.

This article looks at how the status of segments is utilized when XLIFF documents are imported into Lilt.

Importing XLIFF files into Lilt

Lilt supports the importing of Document Actions article.

When importing XLIFF files, Lilt utilizes the XLIFF state field to:

  • Populate the segment’s target content field within Lilt.
  • Set the segment status within Lilt.

The different XLIFF states that Lilt recognizes are shown in the table below, along with how each state is used to populate the target content and set the status of each segment.

XLIFF segment state:

Lilt segment target content is populated using:

Lilt segment status is set to:

translated

Available translation

Confirmed

final

Available translation

Accepted

signed-off

Available translation

Accepted

new

needs-translation

needs-adaptation

Available translation

needsl10n

needs-review-adaptation

Available translation

needs-review-l10n

Available translation

needs-review-translation

Available translation

(no state)

Available translation (if different from source content)

Example XLIFF 1.2 file (using English source text and Spanish target text):

<?xml version="1.0" encoding="UTF-8"?>
<xliff its:version="2.0" version="1.2" xmlns="urn:oasis:names:tc:xliff:document:1.2" xmlns:its="http://www.w3.org/2005/11/its" xmlns:itsxlf="http://www.w3.org/ns/its-xliff/" xmlns:okp="okapi-framework:xliff-extensions">
<file datatype="html" original="sample.html" source-language="en-US" target-language="es-ES">
<body>
<trans-unit id="tu1" restype="x-title-tu1">
<source xml:lang="en-US">HTML title</source>
<target xml:lang="es-ES" state="translated">Título HTML</target>
</trans-unit>
</body>
</file>
</xliff>

If this document is imported into Lilt, the following would happen with the available translation unit:

  • Lilt finds the source text HTML title and adds that in a new segment entry within Lilt.
  • Lilt finds the state of the target segment field: state="translated". Referencing the table above, this means Lilt will:
    • Populate the segment’s target text with the available translation: Título HTML.
    • Mark the segment as confirmed
      .

JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.