What is MXLIFF?
MXLIFF (Memsource XLIFF) is Phrase’s bilingual file format. It’s based on XLIFF 1.2 with an addedm: namespace that carries Phrase-specific segment and job metadata: translation memory (TM) and machine translation (MT) matches, confirmation and lock state, tag metadata, custom field values, and more.
MXLIFF is the format used to move translation content into and out of Phrase TMS (Translation Management System) jobs for editing outside the platform, and to feed translated content back into a translation memory.
For a product-level introduction, see the MXLIFF Files (TMS) support article. This guide documents the format itself for developers who generate, parse, or round-trip MXLIFF programmatically, and gives the full element and attribute reference under MXLIFF structure below.
When to use it
Reach for MXLIFF when you need to:- Export a job’s segments (source, target, TM/MT matches, confirmation and lock state) for editing with an external tool
- Re-import edited segments back into a job
- Store translations from a bilingual file into a translation memory
Working with MXLIFF via the API
The same actions are available from the Phrase TMS web UI: Project → Jobs → Select job(s) → Download → Bilingual MXLIFF to export, and Project → Jobs → Tools → Upload → Select MXLIFF to import.
MXLIFF structure
This section documents the parts of the MXLIFF format that are specific to Phrase. It also mentions the values used for standard XLIFF elements/attributes where that’s relevant. For everything not covered here, MXLIFF follows the XLIFF 1.2 specification.Element tree
<xliff>
The Phrase namespace is added with prefix m and URI http://www.memsource.com/mxlf/2.0.
Attributes:
version: version of the underlying XLIFF format, always1.2.m:version: MXLIFF schema version. New optional elements and attributes are occasionally added as the version increments; unrecognized elements/attributes should be ignored rather than treated as errors.m:level: number representing a workflow level.
<file>
Attributes:
datatype:x-undefined.m:file-format: format of the original file used during import.m:task-id: identifies the task this file belongs to. There is a 1:1 relationship between a job and a task.m:begin-group-id: ID of the first segment (0-indexed) included in the file.m:end-group-id: ID of the last segment included in the file.m:transmem-ignore-tag-metadata: whether tag metadata was ignored for translation memory matching. Values:yes,no.
<header>
Contains:
- Zero or more
<note>elements - Zero or one
<m:metadata-schema>element - Zero or one
<m:in-ctx-preview-skel>element
<note>
Attributes:
m:id: ID of a note, unique within the samem:origin.m:category: categorization of a note.m:origin: path in the original file the note was extracted from; corresponds tox-file-part(see<group>).
<m:metadata-schema>
Describes the schema of all segment-level metadata. Contains one <m:fields> element.
<m:fields> (schema): contains one or more <m:field> elements, each representing a single custom field.
<m:field> attributes:
id: ID of the metadata field definition.type: one oftext,date,boolean,link,number,select,multi.
<m:field> contains one <m:name> element with the field’s display name.
<m:in-ctx-preview-skel>
Skeleton for the in-context preview shown in editors. Contains segment placeholders like <span id="m-tgroup_1" class="m-tgroup"></span>, which editors replace with metadata from <m:in-ctx-preview-metadata> and text from <source>/<target>.
Attributes:
bilingual: whether the job is bilingual (true) or monolingual (false).skel-omitted:trueif the in-context preview is not included.size: length in bytes of the skeleton, set when it’s omitted.
<group>
Attributes:
m:para-id: identifies a paragraph.
- Zero or one
<context-group>element without anameattribute, holding general context information:x-file-part: part of the original file the segment was extracted fromx-key: context keyx-key-note: context notex-max-len: maximum allowed length of a translation
- Zero or one
<context-group>element withname="x-plural", holding plural information for PO (gettext) files:x-plural-category: plural rule category (zero,one,two,few,many,other, or a concrete number)x-plural-examples: sample values for the categoryx-plural-source-singular/x-plural-source-plural: source text in singular/plural form
- Zero or one
<m:prop>element - Zero or one
<m:in-ctx-preview-metadata>element
<m:prop>
Group properties. Contains zero or one <m:target-order> element, a number indicating the order in which to compose target segments (equivalent to Segments order in XLIFF 2.0).
<m:in-ctx-preview-metadata>
Metadata for the in-context preview skeleton, specific to the parent <group>. Contains zero or more <m:mark> elements, each with an id and optional <m:open-mark-content> / <m:close-mark-content> text elements.
<trans-unit>
Attributes:
xml:space:preservem:score: score of an automatically filled translation (e.g. during pre-translation). Whenm:trans-originismt, this is a quality performance score (QPS).m:gross-score: same asm:scorebefore penalization. Only differs fromm:scorefor translation memory matches.m:trans-origin: origin of the filled translation:mt(machine translation),tm(translation memory),nt(non-translatable), orrb(deprecated, superseded bynt).m:trans-origin-detail: detail about the origin, e.g. the specific engine used.m:confirmed: workflow level at which the segment is confirmed.m:locked: whether the segment is locked/editable. Values:true,false.m:locked-by: what locked the segment.m:locked-by-detail: detail whenlocked-byisex.m:para-id: paragraph ID, matchingm:para-idon the parent<group>.m:repetition-exception:truewhen a linguist unmarked the segment as a repetition.m:created-at/m:created-by: when and by whom the segment was created.m:modified-at/m:modified-by: when and by whom the segment was last modified.m:level-edited: legacy attribute, alwaysfalse.
- Two
<alt-trans>elements, distinguished byorigin:machine-trans:match-quality(MT quality score),m:mt-id(MT connector ID),<target>(MT-provided translation)memsource-tm:match-quality(TM match score),tm-id(translation memory ID, if known),<target>(TM-provided translation)
- Zero or one
<context-group name="sub-trans-unit" purpose="information">, holding metadata about sub-units (segments nested within another segment):x-type: type of sub-unit (currently onlyICU)x-subtype: more granular type, e.g. the ICU variable typex-category: differentiates sub-units belonging to the same segment and tag (for ICU, the plural variable form)x-parent-trans-unit: ID of the parent<trans-unit>x-parent-mark-id: ID of the parent markx-examples: sample values (used for ICU plural variables)
- Zero or one
<context-group name="context-key" purpose="match">, holding a context key used when a<group>contains multiple<trans-unit>elements in a hierarchy:x-key: the segment’s context key
- Zero or one
<m:latest-trans-props>element - Zero or one
<m:tunit-metadata>element - Zero or one
<m:tunit-target-metadata>element - Zero or one
<m:editing-stats>element - Zero or one
<m:annotations>element - Zero or one
<m:metadata>element
<m:comment>
Deprecated: no longer written or read since converter version 25.8. Historically held a single segment comment (not the same as editor comment functionality), such as extraction details.
Attributes: created-at, created-by, modified-at, modified-by, resolved (true/false).
<m:latest-trans-props>
Metadata of the latest translation selected in an editor. Contains <m:trans-prop> elements with a name attribute:
score: same asm:scoregross-score: same asm:gross-scoreorigin: same asm:trans-originorigin-detail: same asm:trans-origin-detailprocessed-by: whether the segment was last processed by an AI service such as MT Optimize or Auto Adapttarget-quality: QPS score from MT Optimize or a third-party service, in the range0.0to1.0
<m:tunit-metadata>
Metadata for marks inside <source>, encoded as {1} or {2>translatable<2}. Contains zero or more <m:mark> elements, each with an id and:
<m:type>: type of the mark<m:content>: the mark’s content<m:trans-attributes>: comma-separated list of translatable attributes, each following in a subsequent<m:mark>under the same<m:tunit-metadata>
<m:tunit-target-metadata>
Same shape as <m:tunit-metadata>, but describes marks inside <target> instead of <source>.
<m:editing-stats>
Editing statistics for a segment. Contains one <m:editing-time> and one <m:thinking-time> element (both numbers, in the same unit).
How the times are tracked:
- When a user clicks into a segment, both thinking time and editing time start counting.
- When the user starts editing, thinking time stops but editing time continues.
- When the user clicks into a different segment, editing time stops.
- Re-entering a segment resumes counting and adds to the previous totals; if re-entering results in no edits, the times are left unchanged even if the segment is re-confirmed.
<m:annotations>
Contains one or more <m:annotation> elements.
Attributes:
category: currently onlyLIONBRIDGEis used.type: optional, more specific annotation type.translate: whether the annotated text is translatable (yes/no).excludeFromCharCount: whether to exclude the text from word/character counts (yes/no).offset: offset into<source>where the annotation starts.position: 1-indexed order of the annotated text within<source>.
<m:text> element with the annotated text.
<m:metadata>
Custom metadata values for a segment. Contains one <m:fields> element.
<m:fields> (values): one or more <m:field> elements, each with an rid attribute referencing the corresponding field in <m:metadata-schema>. A field’s value is either plain text, or one or more <m:value> elements when the field type is multi.
<m:extra>
Additional information about the whole MXLIFF document. Contains one <m:users> element, which lists every user (via <m:user id="...">) who created or modified any task included in the file.