File Import Settings

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

Content is machine translated from English by Phrase Language AI.

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

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. Files with ICU messages cannot contain any inline elements.

  • Use HTML subfilter 

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

  • 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 empty, the text in the source element is 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 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

  • 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.

  • Convert to character entities

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

    Example:

    &#160;,&amp;#x3A3;).

  • Convert to Phrase TMS tags 

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 excepting 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.

Application Specific Settings

Drupal/Wordpress .XLIFF

Set 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.

In case of doubt, Drupal/WordPress XLIFF may be a good choice for any other .XLIFF files as well where the translatable strings are in CDATA and contain HTML tags.

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.