<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
	<channel>
		<title><![CDATA[iRedMail — [FAQ] How to translate iRedAdmin to your language.]]></title>
		<link>http://www.iredmail.org/forum/topic378-faq-how-to-translate-iredadmin-to-your-language.html</link>
		<atom:link href="http://www.iredmail.org/forum/feed-rss-topic378.xml" rel="self" type="application/rss+xml" />
		<description><![CDATA[The most recent posts in [FAQ] How to translate iRedAdmin to your language..]]></description>
		<lastBuildDate>Sat, 31 Oct 2009 13:46:15 +0000</lastBuildDate>
		<generator>PunBB</generator>
		<item>
			<title><![CDATA[[FAQ] How to translate iRedAdmin to your language.]]></title>
			<link>http://www.iredmail.org/forum/post1668.html#p1668</link>
			<description><![CDATA[<p>This tutorial is used to explain <strong>how to translate iRedAdmin to your language</strong>. If they don&#039;t work for you, please post a new topic in our <a href="http://www.iredmail.org/forum/forum6.html">iRedAdmin support forum</a>.</p><h5>Where can i download PO file used for translation?</h5><p>=================================================</p><p>In iRedAdmin, both open source edition and Pro edition, there&#039;s a PO file &#039;i18n/iredadmin.po&#039;, you can make a copy and translate it.</p><h5>How to translate iRedAdmin to your language</h5><p>==================================================</p><h5>Install necessary packages before we go further</h5><div class="codebox"><pre><code># ---- On RHEL/CentOS ----
# yum install python-setuptools
# easy_install Babel

# ---- On Debian/Ubuntu ----
$ sudo apt-get install python-pybabel gettext</code></pre></div><h5>Extract strings from Jinja2 template files.</h5><div class="codebox"><pre><code>$ cd /path/to/iredadmin-x.y.z/i18n/
$ bash translation.sh zh_CN</code></pre></div><p>What does &#039;translation.sh&#039; script do?<br /></p><ul><li><p>It will create a new directory &#039;zh_CN&#039; under &#039;i18n&#039; directory if not exist. &#039;zh_CN&#039; is a short name of your language name, you can find other short names in libs/languages.py.</p></li><li><p>Create zh_CN/LC_MESSAGES/iredadmin.po file if not exist.</p></li><li><p>Update zh_CN/LC_MESSAGES/iredadmin.po file if already exist.</p></li><li><p>Compile zh_CN/LC_MESSAGES/iredadmin.po to binary mo file: zh_CN/LC_MESSAGES/iredadmin.mo. iRedAdmin uses mo file only.</p></li></ul><p>Directory structure is something like below:<br /></p><div class="codebox"><pre><code>iRedAdmin-x.y.z/
    |- libs/
        |- languages.py
    |- i18n/
        |- iredadmin.po
        |- msgfmt.py
        |- translation.sh
        |- zh_CN/
            |- LC_MESSAGES/
                |- iredadmin.po
                |- iredadmin.mo</code></pre></div><h5>Translate zh_CN/LC_MESSAGES/iredadmin.po.</h5><p>In this PO file, msgid is original string need to be translated, msgstr is translated string.</p><p>NOTE: You can use PoEdit editor to help translate this file, it&#039;s better to translate it with a text editor. <a href="http://www.poedit.net">http://www.poedit.net</a><br />It will help compile the PO file to MO format while you saving your translation.</p><h5>Convert po file to mo format.</h5><div class="codebox"><pre><code>$ cd /path/to/iredadmin-x.y.z/i18n/
$ bash translation.sh zh_CN</code></pre></div><p>It will create or update zh_CN/LC_MESSAGES/iredadmin.mo.</p><h5>Configure iRedAdmin to use your translation as default language in settings.ini</h5><div class="codebox"><pre><code>LANG = zh_CN</code></pre></div><h5>Visit your iredadmin in web browser, it should work for you now.</h5><p>Preferred language is available for every admin, you can change it in &#039;Preference&#039; link at the upper right corner after login.</p><p><span class="postimg"><img src="http://iredmail.org/images/iredadmin/admin_profile_general.png" alt="http://iredmail.org/images/iredadmin/admin_profile_general.png" /></span></p>]]></description>
			<author><![CDATA[null@example.com (ZhangHuangbin)]]></author>
			<pubDate>Sat, 31 Oct 2009 13:46:15 +0000</pubDate>
			<guid>http://www.iredmail.org/forum/post1668.html#p1668</guid>
		</item>
	</channel>
</rss>
