File Import settings

Multilingual XML Files


Memsource only supports XML files that have both source and target elements present for all paragraphs (even if the target is empty). The individual language elements must all be descendants of the same trans-unit element and one language cannot be contained in the other (see the example below).

File Type must be specified in order to distinguish multilingual XML from monolingual XML.

When the source and target segmentation are different, the source segmentation is determining.

Multilingual XML Sample

Sample of partially translated text from English to German and French. Note that all <tuv lang="en">, <tuv lang="de"> and <tuv lang="fr"> are children of the same <tu> element.

<?xml version="1.0" encoding="utf-8"?>
Not translatable text.
<tu note="context note" key="ID 254" maxlen="16"> 
  <tuv lang="en">
    <seg>First segment.</seg>
  <tuv lang="de">
    <seg>Erste segment</seg>
  <tuv lang="fr">
<tu note="another context note" key="ID 255" maxlen="18"> 
  <tuv lang="en">
    <seg>Second segment.</seg>
  <tuv lang="de">
  <tuv lang="fr">

Multilingual XML Import Settings

 For the import of Multilingual XML files, the XPath query language must be used.

See the sample Multilingual XML above and its import settings on the screenshot.

  • Elements containing source and target sub-elements: //tu
  • Elements containing source text: tuv[@lang='en']/seg (in relation to the parent element //tu)*
  • Elements containing target text (de): tuv[@lang='de']/seg (in relation to the parent element //tu)*
  • Elements containing target text (fr): tuv[@lang='fr']/seg (in relation to the parent element //tu)*
  • Non-translatable inline elements: (all elements in source or target are considered Translatable inline elements unless specified here as Non-translatable inline elements)*
  • Convert to Memsource tags (use regexp): (see our Regexp page for help)
  • Context key - value that constitutes TM context (101% match) if applicable*
  • Context note - import element or attribute of context for each element*
  • Max. target length - import element or attribute of max. target length for each element*
  • Convert to character entities - enter a comma separated list of character references required in the output file. For example when you want quotes " represented as &quot; and character Σ represented as &#x3A3; use &quot;,&#x3A3;. Please note that & and < are always exported as &amp; and &lt;.
*Xpath is relative to "Elements containing source and target sub-elements:" and only sub-elements in this parent element are evaluated.

Multilingual XML Import Rules

Please note that the XPath expression should define the elements which text/value should be translated and not the actual text node.

See more information on XPath.

HTML Subfilter

XML files with html tags (such as &lt;p&gt;) can be imported with option HTML Subfilter. In this case it is possible to set additional setting in the HTML (such as Break tag (<br/>) creates new ).

Please note that paragraph tags (such as &lt;p&gt;) will create a new segments even if the Segment Multilingual XML is unselected.

HTML settings 

Segment Multilingual XML

Having one element as one segment is less error prone, but the text in the source and target elements can be segmented with general segmentation rules if required. The HTML subfilter is an exception.

Using Segment multilingual XML on a file that contains target text may result in a different number of segments in the source and in the target.
  • A warning will be displayed on the project page: "Document segmentation resulted in a different number of source and target segments in some paragraphs. Extra segments have been joined with previous segments using space characters except in non-space languages (e.g., JA, ZH, KO). Try importing without segmentation.
  • A segment comment will be added to the job in the Memsource Editors: "Target is not segmented as expected!".

File Type

 The Multilingual XML file filter will imports files only when it is specifically selected in Import Settings:
  • File Type: Multilingual XML

File Type

Jobs in Project

Multilingual jobs have a slightly different icon then general XML jobs so they are easily distinguished from monolingual jobs.

If the file was imported as multilingual into several target languages, the Completed file will be always composed from all the target languages.

File Type

HTML Preview with XSLT stylesheet


XSLT Preview File

XSLT language (Extensible Stylesheet Language Transformations) can be used to transform XML documents into HTML format for in-context preview purposes. Memsource currently supports XSLT 2.0.

To import the Multilingual XML file with a stylesheet (XSL or XSLT), simply navigate to the bottom of the Multilingual XML import settings and choose an XSLT file. When you import an XML with a stylesheet, the Preview Translation (Document -> Preview Translation) in Memsource Desktop Editor will generate an HTML preview instead of an XML one (video). Once used for file import, XSLT can also be downloaded from the file import settings page.


Download XSLT Preview File

Tag Content Visualized

The tag content of the source XML file can be visualized via Edit - Expand Tags and edited via F2 in MemSource Editor.

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 you can leave a public comment below or Submit a request to our Support team.
Thank you for your feedback.



Please sign in to leave a comment.