Source

iredadmin-ose / docs / HOWTO.i18n

Full commit
i18n support HOWTO
==================

*) Install necessary packages before we go further:
    - Debian/Ubuntu:
        # apt-get install python-babel gettext
    - RHEL/CentOS:
        # easy_install Babel

*) Extract strings from templates:

    # cd /path/to/iredadmin-x.y.z/i18n/
    # bash translation.sh extract

*) Translate '/path/to/iredadmin-x.y.z/i18n/iredadmin.po'.

*) Convert po file to mo format:

    # cd /path/to/iredadmin-x.y.z/i18n/
    # python msgfmt.py iredadmin.po

   You will get 'iredadmin.mo' under current directory.

*) Create directory under 'i18n/' and copy 'iredadmin.mo' greneated
   above into it. e.g. for French language(fr_FR):

    # cd /path/to/iredadmin-x.y.z/i18n/
    # mkdir -p fr_FR/LC_MESSAGES/
    # cp iredadmin.mo fr_FR/LC_MESSAGES/

   Directory format is '{LANGUAGE}/LC_MESSAGES/'.

*) Configure iRedAdmin to use your translation in config/iredconf.py:

    LANG = 'fr_FR'      # The name of directory name created above.

*) Visit your iredadmin in web browser, it should work now.