The Ultimate Guide to Translating Magento (using Translation Memory software)
Magento language files are stored in CSV files of the following structure:
source string,translated string
You can translate such files with a text editor or a spreadsheet but it has the following disadvantages:
- lot of typing on repeated sentences
- hard to stay consistent
- issues when you want to use old translation in new Magento
This guide will show you how to use a free translation memory software to make it easier to translate and keep translations up to date.
=the program is launched from another directory). If you don’t like it that way, see Appendix A.
The following steps are not necessary if you translate from scratch:
- Get an existing translation to be used as a base TM (for example translation from previous version). Download the full package from http://www.magentocommerce.com/langs
- Unpack the existing translation in the directory of your choice. Go to app/locale of the unpacked file
- Download to app/locale the script to convert your existing translations into a database for TM and save it with extension .php
- Change lines
$dest_lang = ‘PL’; put your destination language code here
$src = ‘pl_PL’; put name of your directory with CSV files here, under app/locale/
- Run the script to create a file all.tmx
- Copy the file all.tmx to your OmegaT’s project directory /TM and reload project
- Each time you are presented with a screen similar to the one shown below:
- You have 2 choices:
- translate the segment directly by just typing in the translation in the left window
- choose one of matching translations (Ctrl+1 .. Ctrl+5 chooses 1st to 5th from matches), placing it in the left windows (Ctrl+R) and editing so it matches the source string (make sure about special chars/html codes!)
- if the match is more than 95% compatible, it will be inserted automatically but with [!] (or whatever configured) - you need to delete this [!]
- When you are happy with the translation, go to next by hitting Enter or choosing Go To/Next untranslated segment
- You can also switch between files by selecting it in Project / Project Files.
When you want to try out:
- click Project/Create Translated Documents
- go to your OmegaT projects directory /target. There are your translated CSV files!
- Put them in your Magento app/locale/[LANG CODE], change the language in Magento to this one and enjoy!
- Try to remain consistent across all sentences
- Carefully follow conventions used in original files - HTML codes, escape chars, placeholders
- You can skip Mage_Admin* and some others files and start from the most important files that are used on the front-end.
Force OmegaT to correctly load plugins when called via desktop shortcut:
- Right-click on the shortcut
- Select properties
- Fill in “Start in” field