Select Page

Sometimes we find that we have the same texts in two languages and we could use them in our favourite CAT tool. The process we need to perform is called alignment and there are numerous ways to achieve it.

With the package translate-toolkit, a spreadsheet can become one of the most effective tools for aligning texts. The procedure is quite simple and straightforward using a GNU/Linux workstation. We recommend using LibreOffice, which is free software and is well suited for other software environments too.

First, create a spreadsheet and paste your text into it.

  1. Leave the first column empty
  2. Paste the source text into In column 2
  3. Paste the target text into column 3
  4. Review and correct the text alignment (i.e. correspondence) in those columns as necessary
  5. Save the file as .csv

Then, open a terminal and use the following commands:

csv2po file.csv --progress bar -o file.po

po2tmx file.po -o file.tmx -l es --source-language en

(Remember to replace ‘file’ by the actual file names. The option -l is for your target language code; after running the second line in the terminal we will obtain a TMX file for the en-es language pair.

As we see, this procedure implies two conversions which can obviously be used separately according to more specific needs.

You can find more info and newer versions of the translate-toolkit here.

Ignacio Carretero. Albucasis Specialty Translations