The Ultimate Guide to Translating Magento (using Translation Memory software)
This is an old revision of the document!
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.
1) Download OmegaT software using this link http://downloads.sourceforge.net/omegat/OmegaT_2.0.0_01_Beta_Windows.exe?modtime=1231491460&big_mirror=0&filesize=22718517 (or just from this page, version 2 http://sourceforge.net/project/platformdownload.php?group_id=68187)
2) Install it
3) Download a filter to allow reading/writing CSV files http://www.piotrkaminski.com/public/omegat_csv.zip
4) Unpack it to the installation directory of OmegaT
5) Run OmegaT FROM THE INSTALLATION DIRECTORY (not with shortcut) using OmegaT.exe. (REASON: seems a bug in the software and plugins are not loaded when program is launched from another directory). If you don’t like it do Appendix A.
6) Create New Project and Save it anywhere you want 7) Define source (EN_US) and target languages, uncheck “Enable Sentence-level segmenting”
8) Click Import source files and browse for your Magento’s installation app/locale/en_US. Select all the CSV files there and click ok. Sometimes nothing is shown so just save project and reload.
9) All the CSV files should show up with segment count
10) Configure the editor: Options→Editing Behaviour
The following steps are not necessary if you translate from scratch:
a) Get existing translation to be used as a base TM (for example translation from previous version). Download the full package from here http://www.magentocommerce.com/langs
b) Unpack the existing translation in the directory of your choice. Go to app/locale of the unpacked file
c) Download to app/locale the following script to convert your existing translations into a database for TM http://www.piotrkaminski.com/public/csv_to_tmx.phps and save with extension .php
d) 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/
e) Run the script to create a file all.tmx
f) Copy the file all.tmx to your omegaT’s project directory /TM and reload project
1) Each time your are presented with similar screen as shown below:
2) You have 2 choices:
a) translate the segment directly by just typing in the translation in the left window
b) choosing 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!)
c) if the match is more than 95% compatible, it will be inserted automatically but with [!] (or whatever configured) - you need to delete this [!]
3) When you are happy with the translation, go to next by hitting Enter or choosing Go To/Next untranslated segment
4) You can also switch between files by selecting it in Project / Project Files
When you want to try out:
1) click Project/Create Translated Documents
2) go to your OmegaT projects directory /target. There are your translated CSV files!
3) Put them in your Magento app/locale/[LANG CODE], change lanugage in Magento to this one and enjoy!
1) Try to remain consisten across all sentences
2) Carefully follow conventions used in original files - HTML codes, escape chars, placeholders
3) You can skip Mage_Admin* and some others files and start from the most important files that are used on the front-end.
Forcing OmegeT to correctly load plugins when called via desktop shortcut:
1) Right-click on the shortcut
2) Select properties
3) Fill in “Start in” field