Knowledgebase: Product > Archive
Translate .PO files using memoQ
Posted by Peter Reynolds, Last modified by Viktor Mochnács on 27 March 2018 04:21 PM

Original version (with Polish and English text) available from http://translators.org.pl/blog/index.php/2013/01/13/tlumaczenie-pikow-po-w-memoq

NOTE: Please note that memoQ 2013 and later now natively support .PO files for translation

Context: You need to translate .PO files using memoQ (a common bilingual format which is currently not natively supported in memoQ).

Howto:

memoQ is not equipped with filters allowing to import and translate PO files, so our PO file needs to be converted to a format that is recognized by memoQ. How? Using Rainbow (http://okapi.sourceforge.net/) or a tool named po2xliff (http://translate.sourceforge.net/wiki/toolkit/xliff2po). po2xliff is a part of Translate Toolkit that contains many other converters, yet today I will not touch them. I will focus on po2xliff and reverse converter, namely xliff2po.

Task: to translate a PO file in memoQ and receive a correct translated PO that opens in one of the default PO editors: Po Edit (http://www.poedit.net) or Better PO Editor (http://sourceforge.net/projects/betterpoeditor/).

Why not to translate using PO Edit or Better PO Editor? Because these utilities are useless. They can be used just to display contents of PO files. They do not have translation memory support, no glossaries, even analysis is impossible. They are not equipped with any functionalities used in standard CAT tools. So they do not allow for creating a decent translation. I encourage you to have a look at them and see for yourself.

How then translate PO files using memoQ if memoQ does not support this format? A PO file needs to be converted to XLIFF. Then you can translate in memoQ, export back to XLIFF file, again convert to PO as well as check if the file opens in PO Edit and all the contents display correctly.

1. Having installed Translate Toolkit (http://sourceforge.net/projects/translate/files/Translate%20Toolkit) in Windows Start menu input CMD command (in the command line).
2. In the console go to Translate Toolkit installation catalogue. There will be a po2xliff.exe file. In order not to input whole paths to PO files later on copy your PO file to this catalogue.
3. In the console window input: po2xliff yourPOfile.po yournewXLIFF.xliff (insert your files’ names of PO and XLIFF files).
4. If everything went OK you will see a progress bar and an XLIFF will be created in the same catalogue.
PO to XLIFF conversion
5. To be sure open the XLIFF file in any text editor and check its contents. If it looks similar to the one in the screenshot then everything should be OK.
XLIFF example
6. Such XLIFF files can be imported to memoQ.
7. Open memoQ and in an open project click Add document as… and select your XLIFF file. Segmentation in memoQ must be the same as in PO Edit, so if in PO Edit you see 1000 segments then in memoQ there also have to be 1000 segments. This must be checked after importing the file.
8. Translate the file in memoQ, export it and you will get a bilingual XLIFF file.
9. Again the Windows console opened with CMD command use another converter. This time it will be xliff2po. After opening the catalogue where xliff2.po.exe resides (and your XLIFF file should be there as well) input the following command: xliff2po yourexportedXLIFFfile.xliff youerconvertedPOfile.po. And you will see that the conversion failed. Why is that? Because xliff2po tool is not the brightest one. If the XLIFF file does not convert to PO change its extension from .xliff to .xlf. Now it should work and you should receive your converted PO file.
10. Just to be sure open your converted PO file in PO Edit and check if all the segments display as required and if their number is the same as in the original PO file.
That’s it.

However if po2xliff tool cannot convert the PO file you can use Rainbow tool.

1. Start Rainbow and drag and drop your PO file to Rainbow.
2. Click Utilities, Translation kit creation.
3. In the left window choose the last item Rainbow translation kit creation, and in the right one choose Generic XLIFF.
4. Click Execute.
5. In the PO file location a catalogue structure will be created. Now you are interested in Work catalogue, because it contains the XLIFF file created on the basis of the original PO file.
6. Add this file to memoQ, translate and export.
7. Drag and drop manifest.rkm to Rainbow. This .rkm file was created during PO to XLIFF conversion and resides in the catalogue structure created then.
8. Click Utilities and choose Translation kit post-processing.
9. In the Translation kit manifest dialogue your PO file should be checked, and in the Output column there should be its name with PO extension. Click Continue.
10. A new catalogue DONE will be created in the catalogue structure. It will contain a ready PO file.
11. Open the PO file in PO Edit. Everything should work just fine.
Translation of PO file is finished.

(0 vote(s))
This article was helpful
This article was not helpful

Comments (0)
Help Desk Software by Kayako support.memoq.com/index.php?