Featured
Multilingual XML in memoQ
Reference Number: AA-00262 Created: 11-10-2012 09:52 Last Updated: 28-01-2015 06:58 0 Rating/ Voters

Title: Multilingual XML in memoQ

Context: Some XML files to translate sometimes do contain several “target” languages, here is a way to deal with them in using Excel. However, memoQ also has a built-in Multilingual XML filter. memoQ detects when to use the Multilingual XML filter. The example here shows you the Excel way if you use memoQ 2013 and before. Otherwise, use the Multilingual XML filter. Examples for this filter can be found here.

Howto:

Sample XML file (a multilingual TMX file):

And we’ll turn that into this:

Step 1 – turn the XML into a tab-delimited text file

Open the XML in Notepad++ v6.1.8 or later (http://notepad-plus-plus.org) and use the search/replace with regex feature (Linux style) to replace:

Search

Replace with

\n

-nothing- 

</tu>

</tu>\n

\t

-nothing-

<tuv xml:lang="(..)">.*?<seg>

<tuv xml:lang="\1"><seg>\t

</seg>.*?</tuv>

\t</seg></tuv>

<tu tuid="

<tu tuid="\t

">(.+?)<tuv xml:lang="(..)"

\t">\1<tuv xml:lang="\2"


Note that \n is used here because the sample used LF as a line delimiter, but in Windows-typical files, it is rather CR+LF (\r\n)

Your prepped file should now look like that:

Simply select all and copy/paste into a blank Excel sheet

Step 2 – The multi-column Excel file

We have the string ID, the source English, target Russian. Target SP and target PT were copied from source.