Topic: [FAQ] How to translate iRedAdmin to your language.
This tutorial is used to explain how to translate iRedAdmin to your language. If they don't work for you, please post a new topic in our iRedAdmin support forum.
Where can i download PO file used for translation?
=================================================
In iRedAdmin, both open source edition and Pro edition, there's a PO file 'i18n/iredadmin.po', you can make a copy and translate it.
How to translate iRedAdmin to your language
==================================================
Install necessary packages before we go further
# ---- On RHEL/CentOS ----
# yum install python-setuptools
# easy_install Babel
# ---- On Debian/Ubuntu ----
# ---- Note: On Ubuntu 10.04, replace "python-babel" by "python-pybabel".
$ sudo apt-get install python-babel gettextExtract strings from Jinja2 template files.
$ cd /path/to/iredadmin-x.y.z/i18n/
$ bash translation.sh zh_CNWhat does 'translation.sh' script do?
It will create a new directory 'zh_CN' under 'i18n' directory if not exist. 'zh_CN' is a short name of your language name, you can find other short names in libs/languages.py.
Create zh_CN/LC_MESSAGES/iredadmin.po file if not exist.
Update zh_CN/LC_MESSAGES/iredadmin.po file if already exist.
Compile zh_CN/LC_MESSAGES/iredadmin.po to binary mo file: zh_CN/LC_MESSAGES/iredadmin.mo. iRedAdmin uses mo file only.
Directory structure is something like below:
iRedAdmin-x.y.z/
|- libs/
|- languages.py
|- i18n/
|- iredadmin.po
|- msgfmt.py
|- translation.sh
|- zh_CN/
|- LC_MESSAGES/
|- iredadmin.po
|- iredadmin.moTranslate zh_CN/LC_MESSAGES/iredadmin.po.
In this PO file, msgid is original string need to be translated, msgstr is translated string.
Convert po file to mo format.
$ cd /path/to/iredadmin-x.y.z/i18n/
$ python msgfmt.py zh_CN/LC_MESSAGES/iredadmin.poIt will create or update zh_CN/LC_MESSAGES/iredadmin.mo.
Configure iRedAdmin to use your translation as default language in settings.ini
LANG = zh_CNVisit your iredadmin in web browser, it should work for you now.
Preferred language is available for every admin, you can change it in 'Preference' link at the upper right corner after login.

