Installing multilingual MediaWiki under the same domain
Multilingual is such a common thing today. Wikipedia has multilingual in subdomain. So you may read Wikipedia in English at http://en.wikipedia.org/ and in Thai at http://th.wikipedia.org/. I like it. Anyway, it will not look that pretty if your domain is not just for wiki. For example, http://www.thaigrid.or.th/ which has its wiki at http://research.thaigrid.or.th/. According to subdomain approach, they will have multilingual as follows.
- http://en.research.thaigrid.or.th/wiki/Main_Page
- http://th.research.thaigrid.or.th/wiki/หน้าหลัก
My oh my. I expect it shoud be as follows instead.
- http://research.thaigrid.or.th/en/Main_Page
- http://research.thaigrid.or.th/th/หน้าหลัก
The point is how to do it easily. Below are my steps.
-
Install MediaWiki for English language in
/wen
. -
Make sure that
LocalSettings.php
is correct.$wgScriptPath = "/wen";
$wgArticlePath = "/en/$1";
-
Install MediaWiki for Thai language in
/wth
. -
Make sure that
LocalSettings.php
is correct.$wgScriptPath = "/wth";
$wgArticlePath = "/th/$1";
-
Modify
httpd.conf
.Alias /wiki /var/www/research.thaigrid.or.th/wen/index.php Alias /index.php /var/www/research.thaigrid.or.th/wen/index.php Alias /en/index.php /var/www/research.thaigrid.or.th/wen/index.php Alias /th/index.php /var/www/research.thaigrid.or.th/wth/index.php Alias /en /var/www/research.thaigrid.or.th/wen/index.php Alias /th /var/www/research.thaigrid.or.th/wth/index.php
As a result, http://research.thaigrid.or.th/ and http://research.thaigrid.or.th/en/ is redirected to English language while http://research.thaigrid.or.th/th/ is redirected to Thai language.
Tags: wiki, mediawiki, multilingual
- sugree's blog
- 1379 reads
Post new comment