Memsource only supports xml with both source and targets elements present for all paragraphs (even if the target is empty). The individual language elements must be all descendants of the same trans-unit element and one language cannot be contained in the other (see example bellow).
When the source and target segmentation are different, the source segmentation is determining.
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 and Web Editor.
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"?> <root> Not translatable text. <tu note="context note" key="ID 254" maxlen="16"> <tuv lang="en"> <seg>First segment.</seg> </tuv> <tuv lang="de"> <seg>Erste segment</seg> </tuv> <tuv lang="fr"> <seg></seg> </tuv> </tu> <tu note="another context note" key="ID 255" maxlen="18"> <tuv lang="en"> <seg>Second segment.</seg> </tuv> <tuv lang="de"> <seg></seg> </tuv> <tuv lang="fr"> <seg></seg> </tuv> </tu> </root>
Multilingual XML Import Settings
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 " and character Σ represented as Σ use ",Σ. Please note that & and < are always exported as & and <.
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.
Please note that paragraph tags (such as <p>) will create a new segments even if the Segment Multilingual XML is unselected.
It is important that target (unless is empty) has the same HTML structure as source, otherwise it can result in different segmentation of source and target and can cause troubles (target paragraph might be replaced with source paragraph).
- File Type: Multilingual XML
Jobs in Project
If the file was imported as multilingual into several target languages, the Completed file will be always composed from all the target languages.