Blogging in Indian language? Don’t expect breezy start.

I wish to primarily post in my own language, Gujarati, here on this blog . But setting up WordPress (v3.0.5) to display my blog posts in Gujarati was not a task which can be describe as breezy or easy.

Although the docs section on WordPress does explain in detail how to set up a WordPress in your own language, I could not make my first installation display my post in Gujarati script. I could type very well in Gujarati with my favorite Baraha , the free Indian language software. There was not problem there. Baraha is an excellent app and I have been using it for several years now. The problem was, the minute I saved my post it would not render it correctly and would show up as series of question marks on my post.

I installed the Indic IME by Vishal Monpara and also tried out some other Indian language input methods. This was good substitute for baraha as now the input method was available right inside wordpress. But the font would still not render correctly and my posts were just question marks. After reinstalling my site as well as WordPress, the problem persisted. I also installed WP Native Dashboard, but it did not work as Gujarati translation or wordpress is still not ready.

After struggling for three days I was about to give up, when I stumbled upon a post which mentioned something about editing wp-config.php file. After trying couple of options and some site crash, I finally managed to teach wordpress how to display Gujarati text correctly. Let me tell you, the problem is not with wordpress, but the scanty documentation about installation.

No complains, and here is how I set up a wordpress blog in Gujarati. My blog now displays Gujarati script and I wish to share with others how to set up wordpress in Gujarati or any other language.

1) Install wordpress as described in the documentation.

2) Install Indic IME or anyother wordpress plug in to help you type in Indian language. Also install WP Native Dashboard if you wish to display admin area in your language. (Note: This two plug ins are not required to display Gujarati or any other non-roman script.)

3) Set up and create one posts in English and one in Gujarati or the language you want to use. Most probably your Gujarati post will not display correctly.

4) Log on to your web site host using Use CPanel’s and open file manager.

5) Open the wp-config.php file in the root folder of your wordpress installation and edit the same as follow. (This is the most important part. Even if you just edit this correctly your wordpress site will display correct script.)

In line 31 add   ‘utf8_unicode_ci’ in the empty quotes after define(‘DB_CHARSET’,

Your line should read like this now.

define('DB_CHARSET', 'utf8_unicode_ci');

Add ‘utf_unicode_ci’ in line 34 after the words define(‘DB_COLLATE’,

Your line 34 should read like this now.

define('DB_COLLATE', 'utf8_unicode_ci');

Go to line 72 and add your language code and country code next to  define (‘WPLANG’,

My wp-config line 72 reads like this

define ('WPLANG', 'gu_IN');

Now go back to your wordpress dashboard. Your language should render correctly.

Go ahead and delete your old language post. Blog away happily in the language that you have set up with above steps.

Happy Blogging. Send me a mail, if things work well for you.

This entry was posted on Sunday, February 20th, 2011 at 3:59 pm and is filed under Blogging. You can follow any responses to this entry through the RSS 2.0 feed. You can leave a response, or trackback from your own site.

Leave a Reply

You must be logged in to post a comment.

 

Powered By Indic IME