User:Rickm/enabling easy links pages in other languages

From OpenStreetMap Wiki
Jump to: navigation, search

Hey, it takes a while to understand how wikipedia handles languages, but it's actually fairly easy to implement, the functionality is built into the wiki engine your running. I tested this on a 1.6.5 version of mediawiki, but it looks like it will work on your version too. (I'm happy to help doing this or giving more detail if you want).

If/when you want to do it:

Wikipedia handles languages by having a seperate wiki for each language, and auto-creating an "in other languages" sidepanel showing the links (like on this wikipedia page). Instead of installing a new wiki for each language, its possible to do it by having a different namespace for each language. A namespace is a seperate area of the wiki, for example, the User: in User:FredBlogs is a namespace.

You should be able to set it up with these two steps:

  • Tell the system to create a seperate area for each language:
Open up the localsettings.php file and add, for example:
$wgExtraNamespaces = array(100 => "Francais", 101 => "Francais_talk", 102 => "Espanol" 103 => "Espanol_talk" );
  • Then in the database tell the system that when it see's '''fr''':PageName in a page to create the "in other languages" side panel.
Open up phpMyAdmin and in the 'interwiki' table enter a row for the language(s), for example:

This will make it so when fr:Pagename is entered in a page, that page will have a 'in other languages' sidepanel with a link to Francais:Pagename, which can be edited to include whatever translation you want of the page.

Because your using a namespace not a seperate wiki, any links between french pages would be Francais:LinkedPageName not just LinkedPageName. Also changes in all languages will be inter-mingled on the recent changes page (unlike the seperate DB approach used on wikipedia, wikitravel etc)

I got this information from this page: