Synopsis
vMail.Admin is very easy to port to any language, including Unicode. It is also not limited to occidental character sets. Chinese, Korean, Arabic, Hebrew (...) translations are possible!
But translations need translators, so don't hesitate to join the [[vMail.Admin]] adventure!
There is no need for any programming skills to become a translator! You just have to know your native language and some common english!
Interested? So let's go!
Download sources
Download: po source.
After downloading, the file you will be editing is i18n/en_US/LC_MESSAGES/vmailadmin.po. You only need to do this if you are translation into a language other than English.
How to proceed
Download the *.po files and open them with KBabel if you use KDE, PoEdit or gTranslator if you use Gnome. Don't forget to set your preferences in KBabel, PoEdit or gTranslator to set your name, email, character set, and so on...
Create new *.po file
If at any point you need to create a fresh *.po file, use xgettext:
xgettext --keyword=_ php-script.php
How to continue a translation already in progress
When a translation is already in progress, you do not need to re-write any of the previous strings already translated! This process makes merging the old and the new simple.
* Get the new vmailadmin_source.po and the old en_US from a previous [[vMail.Admin]] release.
* Mix the old and new file by typing:
msgmerge --no-fuzzy-matching -o vmailadmin_updated.po vmailadmin.po vmailadmin_source.po
You can also use the built-in merging tools in KBabel or PoEdit (consult their respective help page)
Then, proceed with editing the merged vmailadmin_updated.po like the initial vmailadmin_source.po, except that you will just have to translate the newly added strings.
Testing your translation
Once you have completed translating the .po file, now you need to generate a binary file that gettext uses called a message catalog (*.mo) file. Change into your working directory and run the following command:
msgfmt vmailadmin_updated.po -o vmailadmin.mo
Then copy the *.mo file to ~/i18n/{YOUR_LOCALE}/LC_MESSAGES and restart your apache services and log in to your [[vMail.Admin]] site to verify it all works.
Proceed like this for all strings, save your file and... Translation is finished! Just post it on the forums and billions and billions of organisms all over the galaxy will thank you! =)
Translation placement
In order to properly translate strings into your native language, both the .po and .mo files must reside in the following location:
| -- vmailadmin root
| -- i18n
| -- en_US
| -- LC_MESSAGES
| -- *.po
| -- *.mo
| -- es_ES
| -- LC_MESSAGES
| -- *.po
| -- *.mo
| -- de_DE
| -- LC_MESSAGES
| -- *.po
| -- *.mo
Related Links
TranslateGettext? - gettext method (preferred, much faster)
TranslatePHP? - Alternate method (PHP-based, much slower)
