[ubuntu-in] Multiple languages in Ubuntu India wiki

Onkar Shinde onkarshinde at gmail.com
Thu Sep 24 10:40:49 BST 2009


Hi all,

I have setup two mediawiki extensions [1][2] on Ubuntu India wiki.
They allow us serving the pages in native languages based on user's
preferred language as set up in browser.

How does it work:
LanguageSelector is a mediawiki extension that reads the the
'Accept-Language' header in a HTTP request and sets the preferred
languages for every session.
Polyglot is an extension which makes use of this list of preferred
languages, checks if the page being accessed is available in one of
those languages and automatically redirects the user towards the page.

How to translate pages:
It is very simple. If you want to translate a page, all you need to do
is create a new page <page_name>/<language_code> containing the
translated content. The language code here is the two letter ISO code
for that language. Example. hi for Hindi, bn for Bengali etc.
So let's say you want to translate the Main_Page in Kannada, you have
to create a page Main_Page/kn and this page should contain the
translated text.

How to view the translated page:
In your browser, you need to set preferred language. If the page you
are trying to view is available in your language of preference then
you will be automatically redirected to the page.

How to forcefully view English version of the page:
1. You can either append a slash (/) to the end of URL. This will take
you to the English version.
2. Whenever you are redirected to a non-English page, you can see a
link at the top to the page from where you were redirected. This link
points to the English version.

Hope this helps.

[1] http://www.mediawiki.org/wiki/Extension:LanguageSelector
[2] http://www.mediawiki.org/wiki/Extension:Polyglot


Onkar
-- 
Passion - Some people climb mountains - others write Free software.
Don't ask why - the reason is the same.



More information about the ubuntu-in mailing list