How to add multi language support to wordpress
with qTranslate
Lately, I have to deal with some wordpress based installs in big
part of my working time. One of the
wordpress sites needed to
have added a multi language support.
My first research in Google pointed me to
WPML Multilingual
CMS The Wordpress Multilingual Plugin
WPML Multilingual CMS looks nice and easy to use but
unfortunately its paid, the company couldn't afford to pay for the
plugin so I looked forward online for a free alternative and
stumbled upon
QTranslate
QTranslate is free and very easy to install. Its installed
the wordpress classic way and the installation went smoothly,
e.g.:
1. Download and unzip QTranslate
# cd /var/www/blog/wp-content/plugins
/var/www/blog/wp-content/plugins# wget
http://downloads.wordpress.org/plugin/qtranslate.2.5.24.zip
...
/var/www/blog/wp-content/plugins# unzip qtranslate.2.5.24.zip
...
Just for fun and in case the plugin disappears in future,
a mirror of
Qtranslate 2.5.24 is found here
2. Enable QTranslate from wordpress admin
Plugins -> Inactive -> qTranslate
(Activate)
After activating the plugin, there is a
Settings button from
which
qTranslate's various plugin parameteres can be
tuned.
In my case my site had to support both English and Arabic, so from
the settings I added support for Arabic translation to the
wordpress install.
Adding
Arabic is done in the following way:
a. From the Language Management (qTranslate Configuration) from the
Languages menu and the
Languages (Add Languages) I
had to choose a
language code (in my case a language code of
ar - for Arabic). Next I had to choose the Arabic flag from
the follow up flag list.
In next text box
Name , again I had to fill Arabic, for
Locale
en_US.UTF-8
The following
Date Format and
Time Format text boxes
are optional so I left them blank.
To complete the process of adding the Arabic as a new language
wordpress should support I pressed the
Add Language button
and the Arabic got added as a second language.
Afterwards the Arabic was added as second language, on the bottom
of the left wordpress menu pane a button allowing a switch between
English, Arabic appeared (see below screenshot):
Finally to make Arabic appear as a second language of choice on the
website I added it as a
Widget in the
Widgets menu
from the AWidgets menu:
Appearance -> Widgets
In widgets I added
qTranslate Language Chooser to the
Sidebar without putting any kind of Title for
qtranslate
widget .
I found it most helpful to choose the
Text and Image as an
option on how to display the Language switching in the wp.