XLIFF 2 Information


Wordbee supports the XLIFF 2.0 features as described in the OASIS specification.

Version

You can find the XLIFF version in the "version" attribute of a file. Example:


<xliff xmlns="urn:oasis:names:tc:xliff:document:2.0" version="2.0" srcLang="en" trgLang="fr"
		xmlns:slr="urn:oasis:names:tc:xliff:sizerestriction:2.0"   xmlns:res="urn:oasis:names:tc:xliff:resourcedata:2.0"
		>

Filter options

To view and edit the XLIFF filter options, go to Translation Settings > Document Formats and select XLIFF files. The XLIFF files - Configuration window opens. 


Properties and settings

Find below a subset of the XLIFF 2.0 filter settings. Note: XLIFF 1.0 does support the same options.

Comments

XLIFF files can include comments or notes. Tick the first option below to extract and display XLIFF notes as Wordbee comments in the Translation Editor:Comments







We read <note> tags on <file> and <unit> level. File-level notes are attached to documents in Wordbee and unit-level notes are attached to either the source text or the translation.

The second option permits to save changed or new comments back to the translated XLIFF.

HTML content

If the XLIFF file contains HTML content, you can select the option Content is HTML to apply the HTML filter. As a consequence, the system will no longer look for the XLIFF style markup but applies the selected HTML filter instead. 







Document comments are not saved back to the file. Saving back is available for comments attached to segments only.


Additionally, you can instruct the system to Split the text as HTML breaking tags. As a result, the
 system will NOT sub-segment the text at HTML breaking tags (eg: <p>, <div>.......etc.). Select this option only if XLIFF already contains translations and the translated HTML does not match the source HTML well, e.g. when the source contains two <div> tags whereas the translation contains just one.










For the aforementioned behaviour to take place, take into consideration the following prerequisites:


1) The XLIFF file that is going to be marked for online translation using this XLIFF configuration contains HTML content.

2) You have first configured the "Non-breaking tags" in the HTML configuration that is attached to the XLIFF configuration. To configure the non-breaking tags, click on View to access the HTML settings.



Context field

The Wordbee context field is populated with the translation unit ID (<unit id="heading1"..:>).

The context can be viewed in the translation editor. If activated in the word count profile, the system gives more weight to memory matches with identical context.

Size restrictions

This requires the slr:profiles node with attribute generalProfile="xliff:codepoints". The maximum size restriction is then read from a unit node, such as: <unit id="a1" slr:sizeRestriction="60">

You need to enable reading out size limits:

Reference material

Such as links to images for the translator) from the <res:resourceData> node on file or unit level. The individual resource items are scanned for hyperlinks to reference material and extracted into Wordbee comments.

Enable reading this information, see below. The second line is applicable to XLIFF 1 files only.

Example:

<unit id="a1" name="exclude" slr:sizeRestriction="60">
	<res:resourceData>
		<res:resourceItem id="r1" mimeType="text/xml" context="no">
			<res:source href="resources\en\registryconfig.resources-en.xml" />
			<res:target href="resources\de\registryconfig.resources-fr.xml" />
		</res:resourceItem>
	</res:resourceData>

Web preview URLs

XLIFF files may contain <res:reference href="{url}"> nodes. These can be extracted to segment-level custom fields. The option is found in the "Web preview" tab of the configuration:

URL references may appear inside the <file> node as well as inside a <unit> node. The latter is given preference when extracting a URL for a segment. For example, if a file-node contains a reference it is assigned to every single segment, unless a segment explicitly specifies a different reference in its unit-node.

Example:

<unit>
	<res:resourceData>
		<res:resourceItem id="item-unit1" mimeType="text/xml" context="no">
			<res:reference href="https://myreference.com/page" />
		</res:resourceItem>
	</res:resourceData>
	<segment>
		<source>Source text</source>
	</segment>


Preserve white spaces yes/no

Full support of xml:space attribute. The default whitespace mode can be set in the filter options:

Translate yes/no

XLIFF may flag a unit to be excluded from translation. This is done with the attribute: translate="yes" or translate="no". Examples:


<file translate="no">
<group translate="yes">
<unit id="100" translate="no">

Any file, group or unit that is flagged translate="no" will be disregarded and not extracted from the XLIFF file.

Status

Optional mapping of the XLIFF "state" of a segment to the Wordbee translation status.

If the value is "approved" or "final" then the translation status will be set to green / OK. Example:


<segment state="final">
	<source><sc id="1" type="fmt" subType="xlf:b"/>First sentence. </source>
</segment>


Finally you can choose to save the Wordbee translation status back to the XLIFF file. This sets the XLIFF segment status to: "final" if the Wordbee status is green, "initial" if no translation is provided and "translated" otherwise.

Segment "last editor" value

Any translations extracted from the XLIFF are tagged as "Previous version in-context".

Non translatable segments

The filter lets you exclude segments from translation by various criteria.

 

Options are:

    • Exclude units by their "id" attribute.
    • Exclude source segments by their "state" value. Type a state value or regex.
    • Exclude units by their "name" attribute (the restype option is available with XLIFF 1 only)
    • Exclude units by a content in a note. For example, typing "exclude" in the pattern will skip any units that have a <note> containing this word.

CDATA

We fully support CDATA content such as in:


<segment>
	<source>Hello! <![CDATA[I am<br />Joe Schmoelz]]></source>
</segment>


In compliance with the XLIFF 2 specifications, translations are outputted without CDATA.

Limitations

There are also a few limitations:

  • We do not yet read the canSegment attribute in the standard.
  • The SDL XLIFF options in the filter are disregarded with XLIFF 2




Copyright Wordbee - Buzzin' Outside the Box since 2008