XLIFF (XML Localisation Interchange File Format) is an XML-based format created to standardize the way localizable data are passed between tools during translation and localization. It's also common format for translation tools.
XLIFF files are bilingual or multilingual. XLIFF is not a source document format. The files contain entire segments, similarly to the way memoQ shows them in the translation editor. There is status information; there are tags; and match rates may also be saved. In addition, the XLIFF file may contain "skeleton" and preview data, required to export translated documents. But if the XLIFF file comes from a different tool, memoQ can't interpret the skeleton or the preview data.
Don't use this for memoQ XLIFF, it's special: Normally, memoQ exports bilingual documents in its own flavor of XLIFF. The files have the MQXLZ extension. To import those, use the simple Import command, or drop the files on the Translations pane in Project home.
Import SDLXLIFF with the special SDLXLIFF filter: Normally, memoQ uses the SDLXLIFF filter to import XLIFF files saved in SDL Trados Studio. You can import these using this generic XLIFF filter, too. For instructions, scroll down on this page.
XLIFF comes in, XLIFF goes out: After memoQ imports an XLIFF file from a different tool, it can export an XLIFF file only. memoQ can't export the translation in the original format: for that, you need the original tool.
In this window, you can set up how memoQ imports XLIFF files.
How to get here
- Start importing an XLIFF file.
- In the Document import options window, select the XLIFF files, and click Change filter and configuration.
- The Document import settings window appears. From the Filter drop-down list, choose XLIFF filter.
What can you do?
Normally, memoQ looks for the the main languages of the project in the XLIFF file. If they are found, memoQ imports the text that belongs to those languages. Normally, when memoQ matches the languages, it looks for the main languages only. If the sublanguages are different, the XLIFF file can still be imported.
- This can be a problem if the XLIFF file has different sublanguages of the same main language (such as US English and UK English). In this case, memoQ won't know which one to import.
- Another problem is if the XLIFF file doesn't have one or more of the languages of the project.
- To import only those parts where even the sublanguages are the same as in the project: Click the Import only content where languages match project languages exactly radio button.
- To import every unit from the XLIFF file, regardless of the languages: Click the Import all content regardless of language radio button.
To export the translation with the correct target language code: The target-language segments may be missing from the XLIFF file. When these are translated, memoQ exports them with the target language of the project. If, for any reason, you need to keep the language codes in the XLIFF document after export, clear the Use project target language in export if it is not specified in the original check box.
Text in the XLIFF strings can contain XML-like markup. It's not necessarily XML, though.
XLIFF can handle any kind of markup because it uses "masking" tags to separate any form of markup from the rest of the text. These masking tags are:
- bpt: Marks an opening tag in the original format
- ept: Marks a closing tag in the original format
- ph: Marks a placeholder in the original format
- it: Marks a miscellaneous inline tag in the original format
The XLIFF file contains the actual markup in the <bpt>...</bpt>, <ept>...</ept> etc. elements.
Normally, memoQ imports these as regular opening, closing, ph and it tags. In the translation editor, a <bpt>...</bpt> sequence becomes one single inline tag. For example, <bpt><span class="head"></bpt> will be imported as <bpt val="<span class="head">">.
If you are entirely sure that the markup between the <bpt>...</bpt>, <ept>...</ept>, etc. tags is well-formed XML: You can import the markup without the <bpt>, <ept>, <ph>, <it> masking. To do that, click the Interpret as XML tags radio button. As a result, the masking tags won't appear in the translation editor. For example, <bpt><span class="head"></bpt> will be imported as <span class="head">". From the type of the tag, memoQ will know if it must export a <bpt>, <ept>, <ph>, or <it> sequence.
Careful when importing markup without masking: If the markup between the masking tags isn't well-formed XML, memoQ won't import the XLIFF document.
Normally, an XLIFF file contains segmented text, either in the form of trans-unit or mrk elements.
You can decide whether or not you need to segment the text inside these elements.
Normally, memoQ leaves the XLIFF segmentation as it is: Whatever was one segment in the XLIFF file will become one segment in memoQ.
- To split untranslated, unsegmented text in the trans-unit elements: Check the Segment source if no "seg-source" is present for a "trans-unit" check box. memoQ won't segment the text if the segment boundaries are already there. (Those are marked with seg-source elements.)
- For best results with SDLXLIFF files saved from SDL Trados Studio: Check the Only import segmented content inside "mrk" elements check box.
Normally, memoQ leaves spaces and newlines as it finds them in the XLIFF file. But if you need them differently, you can normalize the whitespace, and you can break segments at newlines.
- To replace all whitespace (sequences of spaces and tabs) with a single space character: Check the Normalize whitespace by default check box. There are formats where the extra spaces disrupt the formatting or the alignment of text.
- To start a new segment at newline characters: Check the Newline breaks segment if no "seg-source" is present for "trans-unit" check box. This won't work if the segment boundaries are already there. (Those are marked with seg-source elements.)
XLIFF documents may contain 'mrk' tags that do not start a new segment, and memoQ does not know how to handle them. This depends on the other tool that exported the XLIFF document.
When these mrk tags are imported, there may be several tags in each segment. They need to be copied to the target segment, according to the translation. In the process, paired tags may become mixed up, and some pairs may be missing. To export a valid XLIFF document even in this case, check the Check correct pairing of tags upon export; drop all problematic tags check box.
This behavior applies to plain XLIFF documents only: From SDLXLIFF, WorldServer XLZ, or XLIFF:doc files, memoQ will import 'mrk' tags it can process, and it will drop all other 'mrk' tags.
XLIFF is a document format that has everything that a translation tool needs. So, the context of segments can also be stored in XLIFF files.
Normally, from each translation unit (trans-unit), memoQ imports an attribute called resname as the context. If the resname attribute isn't there, memoQ doesn't add context to the imported segments. This way, memoQ treats XLIFF as a structured document - normally, the previous and next segments (the text-flow context) don't count.
To change this, click the Advanced tab. Use the radio buttons under Context.
- If the resname attribute isn't there, you can use the ID of the trans-unit for context: Click the Use value of trans-unit's "id" attribute as context ID radio button. memoQ imports the ID attribute of each trans-unit element as the context of that segment.
- To treat the XLIFF document as running text: Click the Do not import context ID radio button. memoQ will use the text-flow context (previous and next segments) instead of identifiers.
XLIFF documents contain alternate translations (often in different languages) and comments. These can be imported into memoQ.
To change this, click the Advanced tab. Use the radio buttons under Comment.
Normally, memoQ imports XLIFF notes as comments. In addition, memoQ imports the alternate translations and the context information as comments.
- To ignore alternate translations: Clear the Import "alt-trans" for other languages as comment check box.
- To drop the context identifier from the comments: Clear the Import context ID as comment check box. The context information will remain in the context, but you won't see it in the comments.
Normally, memoQ doesn't export the comments in the XLIFF files, but it keeps the notes that are already there.
- To export memoQ comments: Check the Export comment as XLIFF "note" check box.
- To replace the original notes with memoQ comments: Clear the Keep original XLIFF notes too in export check box. If you do this, memoQ deletes all original notes, and exports the memoQ comments only as XLIFF notes.
In an XLIFF document, some segments may be marked as not to be translated. Each trans-unit element has a translate attribute. If a segment is not to be translated, this attribute is set to "no".
To change this, click the Advanced tab. Use the radio buttons under For translation units where the translate attribute is set to no.
You can leave these segments out from the import completely: To do that, click the Do not import radio button.
To import the match rate in memoQ, click the Advanced tab. Use the controls under Match rate.
Check the Import match rate check box. Type the name of the attribute that has the match rate in the XLIFF file.
XLIFF is a document format that has everything that a translation tool needs. So, the status of segments can also be stored in XLIFF files.
Standard XLIFF has a specific set of states, but translation tools can also add their own status elements, attributes, and values - so it's not entirely standard.
memoQ can read the segment states from the XLIFF documents, and translate (map) them into memoQ segment statuses that you can see in the translation editor.
Normally, memoQ imports and exports the status codes of segments. You can turn this off on the Advanced tab first. Use the check boxes under State and state-qualifier.
If status codes are imported, they are also translated (mapped) into memoQ segment statuses: To view and change the actual mapping, click the States tab.
- To forget about the XLIFF state qualifiers: Clear the Map XLIFF states to memoQ states at import from any source check box. If you do this, memoQ won't import the status information from XLIFF if this is checked, memoQ will read the standard XLIFF state qualifiers that are included in the XLIFF file, and map them to memoQ segment status information. You can set up the detailed mapping on the the Mapping tab of this dialog.
- Normally, memoQ exports the segment status for segments where the XLIFF document had no status. To turn this off: Clear the Fill/add "state" attribute in export for unknown source and the Fill/add "state-qualifier" in export for unknown source check boxes.
To see (and change) how XLIFF states are mapped into memoQ segment statuses: Click the States tab.
On this tab, you can match the segment status codes in memoQ to the standard trans-unit states in XLIFF. For example, memoQ may import the final state in XLIFF a Reviewer 2 confirmed. In turn, memoQ may export the Reviewer 2 confirmed status as signed-off in XLIFF.
memoQ works with standard XLIFF trans-unit states only: memoQ can process segment status information from SDL Trados Studio. But proprietary status attributes from other tools are not visible to memoQ.
The Import list shows how XLIFF states are translated into memoQ segment status codes when memoQ imports an XLIFF document.
To change the mapping: In one of the drop-down lists next to an XLIFF state, choose a different memoQ status code.
If the XLIFF document has a state value that is not on the list, you can add it. At the bottom of the list, click Add. The New XLIFF state mapping window appears:
Type the state label in the Value in XLIFF "state" attribute box. From the memoQ segment status drop-down box, choose a corresponding memoQ segment status value. You can choose from Not started, Translator confirmed, Reviewer 1 confirmed, Reviewer 2 confirmed, Fragments, Edited, Pre-translated, Rejected or Machine Translated. To add the mapping, click OK.
You can delete a mapping: Click the mapping. Click Remove.
Caution: memoQ will not ask for confirmation.
To export the memoQ segment status values as XLIFF trans-unit state labels: Check the Map memoQ states to XLIFF states at export check box.
In the Export section, you can set an XLIFF state attribute for each memoQ segment status value. To change the XLIFF state label: Click the label next to the segment status. Type a new XLIFF state label. Press Enter or click away from the cell. You cannot add new export mappings because the segment status codes are hard-coded in memoQ.
Use SDLXLIFF filter instead: memoQ has a direct filter for SDLXLIFF, and memoQ chooses that for SDLXLIFF documents by default. Do not use the generic XLIFF filter to import SDLXLIFF documents - unless you encounter problems with the direct SDLXLIFF filter.
You may have problems exporting metadata: This filter may fail to export all metadata that are originally there in the SDLXLIFF document. For memoQ 2015 (build 7.8.100) and higher, the direct SDLXLIFF filter was upgraded to treat these properly. Always use the direct SDLXLIFF filter to import SDLXLIFF document - the generic XLIFF filter is obsolete, and should not be used, except for troubleshooting.
To import SDLXLIFF documents through the standard XLIFF filter:
- Start importing an SDLXLIFF document with options.
- In the Document import options window, select the SDLXLIFF files, and click Change filter and configuration.
- The Document import settings window appears. From the Filter drop-down list, choose SDLXLIFF filter. The standard XLIFF settings appear.
- Click the General tab. Check the Only import segmented content inside "mrk" elements check box.
- Click the SDLXLIFF tab.
- Choose what happens to confirmed segments that come from a translation memory. Normally, memoQ imports them as Translator confirmed. Under Confirmed segments, you can change that, and import them as Pre-translated: Click the Pre-translated radio button.
- Under Additional comments, you can choose what happens to reviewing statuses that come with the SDLXLIFF document. In memoQ, these will appear as comments. Normally, memoQ indicates all these statuses by adding comments.
- For translations rejected by a reviewer, include comment: memoQ will append this to the comment field in memoQ.
- For translations approved by a reviewer, include comment: memoQ will append this to the comment field in memoQ.
- For translations with "Signed of rejected" status, include comment: memoQ will append this to the comment field in memoQ.
- For translations with "Signed off" status, include comment: memoQ will append this to the comment field in memoQ.
memoQ uses a hard-coded mapping to translate SDLXLIFF status codes into memoQ status codes. The mapping is as follows:
|Translator confirmed or Reviewer 1 confirmed
|Reviewer 2 confirmed
|Reviewer 2 confirmed
When you finish
To confirm the settings, and return to the Document import options window: Click OK.
To return the Document import options window, and not change the filter settings: Click Cancel.
In the Document import options window: Click OK again to start importing the documents.