File Import Settings

.XLIFF 1.2 and 2.0 - XML Localization Interchange File Format (TMS)

Tag content of source file can be visualized in the Editor by clicking Expand Tags under the Tool menu and edited by clicking F2.

Enable the XLIFF check when setting up quality assurance to help avoid structural corruption.

Important

Issues with tags are a common cause of export errors. Always ensure tags and formatting are correct before exporting files by running quality assurance checks.

Tip

If the XLIFF content contains HTML tagging, select Drupal/Wordpress XLIFF as the file type when creating the job or project template.

File Types

  • .XLF

  • .XLIFF

  • 2.0 Only

    Files with the file header <xliff version="2.0">

Import Options

  • Parse ICU messages

    ICU messages are automatically converted to tags. When a segment contains inline elements, ICU parsing for that segment is skipped. Segments without inline elements are parsed normally.

  • Use HTML subfilter 

    Imports HTML tags contained in the file. Tags can then be used with HTML File Import Settings.

    When the HTML subfilter is enabled, tag names that are not part of the default recognized HTML inline element list (standard inline elements such as span, a, and em) are not converted into protected inline tags. Instead, they are treated as segment-boundary or block-level elements. This includes custom or pseudo-tag names used as inline wrappers in source content, for example a tag named link used to wrap a piece of text.

    As a result, the opening and closing markers of such a tag do not appear inside any single segment in the Editor. The segment is split at the tag boundary instead. The underlying content and the wrapped text are not lost from the file, but the tag data cannot be reassembled as an inline tag because it was never recognized as one.

    To keep a custom or non-standard tag name as a protected inline tag inside a single segment, add the tag name to Translatable inline elements under HTML File Import Settings for the file type. This setting can also be configured in a project template so it applies automatically to projects created from that template.

  • Import <note>

    Data from the <note> element will be displayed in the Context window.

    Only a <note> in a <unit> is supported (according to XLIFF 2.0 standards).

  • Save confirmed segments to TM on import

    Segments imported as Confirmed are saved to the project translation memory in Write mode.

  • Segment XLIFF

    Standard segmentation is applied. If not selected, one element will be one segment. This may result in multiple sentences per segment. If selected but one element remains one segment, the attribute canResegment="no" may be present in the file. To push the segmentation, change this attribute to "yes". If there is no canResegment="no" attribute, the unit will be segmented.

    If the target segment is not empty, the text in the source element is not segmented. This behavior cannot be changed by enabling/disabling the Segment XLIFF option or adjusting segmentation rules.

    If an imported unit has segment elements in the original file, it is not segmented further; it is considered as already segmented. This behavior cannot be changed by enabling/disabling the Segment XLIFF option. Segmentation can only occur if the unit has a single segment element and no ignorable elements.

  • Interpret linebreak/pagebreak tags

    XLIFF linebreak and pagebreak tags create new segments. This option will be applied only if Segment XLIFF is also enabled.

  • Preserve whitespaces

  • Copy source to empty target if segment is not imported

  • Override XLIFF target values

    If enabled, the target language values from the uploaded file are ignored and replaced with the job's target language values.

  • 2.0 Only Represent text with attribute "translate=no" as non-translatable tags

  • 1.2 Only Context note

    Context must be in either trans unit in elements context-group or context with context-type attributes.

  • 2.0 Only Context key

    The context must be in the unit element or unit descendants. The base node (context node) for the XPath evaluation is the unit element. The default XPath is: @id.

    Note

    Context key XPath and XML namespaces

    XLIFF 2.0 elements exist within an XML namespace, so Context key XPath expressions referencing element names directly may not work. If your expression returns no results, use the  local-name() function instead.

    For example, to extract a <note> element with category="key", use:

    *[local-name()='notes']/*[local-name()='note' and @category='key'] 

  • Convert to Phrase TMS tags 

  • Convert to character entities

    Comma-separated list of character references required in the output file.

    Example:

    &#160;,&amp;#x3A3;

Import segment rules

Adding rules changes the default import settings. Rules can be combined or added and can be applied using the available form or manually. Custom XLIFF states are supported. Separating arguments by a comma creates the AND logical relationship, while a new line creates the OR logical relationship.

XPath can also be used in rules, but it will be evaluated relative to each trans-unit element (i. e. not the document).

Examples:

  • Import only segments where the <trans-unit> element has a resname attribute of which the value is or contains info: .[contains(@resname,'info')].

  • Import only segments where the <trans-unit> element has no such segment-metadata child element where the tm_match attribute is or contains 100.00:  .[not(contains(segment-metadata/@tm_match,'100.00'))]

    To exclude 100.00 and 101.00% matches from your import, use or as follows: .[not(contains(segment-metadata/@tm_match,'100.00') or contains(segment-metadata/@tm_match,'101.00'))].

XPath can also be used in rules, e.g. importing segments .[contains(@resname, 'info;yes')].

By default , all XLIFF trans-units are imported. If segmentation is performed, <source> is segmented and <seg-source> is not. The status of all segments after import is not confirmed nor locked.

Custom import settings

  • Do not import segment when

  • Set segment confirmed when

  • Set segment locked when

Export attributes mapping

Adding rules changes the default import settings. Rules can be combined or added and can be applied using the available form or manually. Custom XLIFF states are supported.

By default, all XLIFF trans-units in the exported target file will look identical to the source except that the target will be translated. To change the XLIFF states, segment statuses can be mapped to XLIFF states.

Example:

New to Translated in the exported target XLIFF file.

Custom export settings

Specific target attributes can be mapped based on the following segment statuses:

  • Confirmed and locked

  • Confirmed and not locked

  • Not confirmed and locked

  • Not confirmed and not locked

Maximum target length

When a unit is divided into more segments, all segments will have the same maximum length property. This will be equal to the maximum for the unit.

In this case, the following warning is returned after import:

A unit is split to more segments, the maximum length limit will be checked for each segment separately.

1.2 

The attribute maxwidth can be used to specify maximum target length for translation in these conditions:

  • Maxwidth must be in a trans-unit element (not in a group).

  • Size must be specified in size-unit="char" or size-unit="percent".

  • There is only one segment in the trans-unit element.

    A warning is displayed if there are more segments in the trans-unit element.

 2.0 

The maximum target length feature is supported only if:

  • The file element contains slr:profiles with generalProfile="xliff:codepoints"

  • Unit in the file contains the sizeRestriction attribute.

The maximum value is then set as the maximum length property of the segment.

Note

When the HTML subfilter is enabled, tag names that are not part of the default recognized HTML inline element list (standard inline elements such as span, a, and em) are not converted into protected inline tags. Instead, they are treated as segment-boundary or block-level elements. This includes custom or pseudo-tag names used as inline wrappers in source content, for example a tag named link used to wrap a piece of text.

As a result, the opening and closing markers of such a tag do not appear inside any single segment in the Editor. The segment is split at the tag boundary instead. The underlying content and the wrapped text are not lost from the file, but the tag data cannot be reassembled as an inline tag because it was never recognized as one.

To keep a custom or non-standard tag name as a protected inline tag inside a single segment, add the tag name to Translatable inline elements under HTML File Import Settings for the file type. This setting can also be configured in a project template so it applies automatically to projects created from that template.

Application Specific Settings

Drupal/Wordpress .XLIFF

Settings are applied in the project template used with the Drupal plugin.

The Wordpress filter uses the HTML subfilter, so .HTML import settings can be applied. If more customization is required than available in HTML import settings, .XML format should be used.

Drupal/WordPress XLIFF is also a good default for .XLIFF files when translatable strings are in CDATA and contain HTML tags.

memoQ

No settings are available if auto-detected and imported as memoQ XLIFF. If configuration is required, import the file using XLIFF 1.2 import settings. The segment statuses of memoQ XLIFF must be manually configured in import settings.

HTML subfilter and custom inline tags

When the HTML subfilter is used, for example with XLIFF 2.0 import settings, only a default list of recognized HTML inline elements, such as span, a, and em, are converted into protected inline tags that stay inside a single segment. Any other tag name used as an inline wrapper, including custom or pseudo-tags such as link, is not recognized as inline content. The HTML subfilter treats an unrecognized tag as a segment boundary instead, so the tag markers do not appear inside any single segment in the editor. The surrounding text and the content the tag wraps are not lost from the underlying segment data, but the tag markup is split across adjacent segments rather than preserved as a single protected tag.

To keep a custom or pseudo-tag as a protected inline tag inside one segment, add its tag name to Translatable inline elements in the HTML File Import Settings for the file type. This setting can also be configured as part of a project template or at organization level under File import settings, so it applies by default to new projects that use the same import settings.

Was this article helpful?
★ ★ ★ ★ ★

Sorry about that! In what way was it not helpful?

The article didn’t address my problem.
I couldn’t understand the article.
The feature doesn’t do what I need.
Other reason.

Note that feedback is provided anonymously so we aren't able to reply to questions.
If you'd like to ask a question, submit a request to our Support team.
Thank you for your feedback.