I spend several hours trying to understand the translation process and how I can quickly (without having to join translation team and providing translation online etc.) translate several phrases for French and Spanish that were not yet "officially" translated (the phrases are still in English when viewing pages in FR or ES).
The reason I need to do "offline translation" is that the translation was provided to me by a client and I don't really know if it's a "proper" translation or a customized text that is not good enough for "official" translation.
Here is the procedure that works for me (Windows based):
(one by one, all 18 of them, what a pain) *.po translation files
for your current CiviCRM version from http://www.transifex.net/projects/p/civicrm/
For example, all translations for CiviCRM 3.3 are here: http://www.transifex.net/projects/p/civicrm/r/civicrm-33/
All *.po files for CiviCRM 3.3 French (fr_FR) are here: http://www.transifex.net/projects/p/civicrm/r/civicrm-33/l/fr/
All *po files for CiviCRM 3.3 Spanish (es_ES) are here: http://www.transifex.net/projects/p/civicrm/r/civicrm-33/l/es/
Note: you will need to create an account for this purpose but it's quick and easy - follow instructions on transifex
2. Download Poedit application
) that will help you translate chosen strings. Install it.
3. Now you can double click on each of the .po files, find the string you want to translate
and provide the translation. Save the file.
4. Once done adding all the translation strings, copy all .po files
(there should be 18 of them) to the bin folder
in the location where Poedit was installed.
For example, in Windows standard installation for Poedit would be C:\Program Files\Poedit\bin
5. Open command prompt
, navigate to the same location C:\Program Files\Poedit\bin
For those who haven't used Windows command prompt for a while, execute the following 2 commands:
cd program files/poedit/bin
6. Join all separate .po files
into one civicrm.po file by typing in the command prompt:
msgcat -o civicrm.po *.po
7. Compile the civicrm.po file into civicrm.mo
by typing in the command prompt:
msgfmt -o civicrm.mo civicrm.po
8. Copy newly created civicrm.mo
file into a proper directory to replace the original file (for example, to replace FR file, copy it to sites/all/modules/civicrm/l10n/fr_FR [Drupal path])Resources:Annex: For those who wonder how to decompile .mo file into .po file:
Copy .mo file to Poedit bin directory
Using command prompt, navigate to poedit/bin directory and execute:
msgunfmt input.mo > output.po
Use Poedit to edit that new .po file.