Translating MediaWiki articles

From FVue
Jump to: navigation, search

Problem

Sometimes I want to write a MediaWiki article in my native language Dutch instead of English. What are the best practices when writing MediaWiki articles in more than one language?

Solution: Template:Languages

Instead of installing one of the MediaWiki Internationalization extensions[1] I decided to use the Template:Languages[2] from www.mediawiki.org. This template is also used by wiki.secondlife.com[3].

These are the steps to install Template:Languages:

  • Install the ParserFunctions extension
  • Make sure your MediaWiki has Subpages enabled within the `main' namespace by adding the lines underneath to LocalSettings.php:
    # Template:Languages requires subpages enabled within the `main' namespace.
$wgNamespacesWithSubpages[NS_MAIN] = true;
  • Copy Template:Languages and Template:Languages/Lang as MediaWiki pages to your own MediaWiki. Within Template:Language, limit the Template:Language/Lang call-list to include only the languages you whish to support in your MediaWiki.

Follow the guidelines on http://www.mediawiki.org/wiki/Template:Languages for how to setup your articles.

Example:

Environment

  • MediaWiki-1.11.0

See also

Category:Internationalization extensions
List of MediaWiki extensions providing internationalization

Journal

20080321

MediaWiki multi-Language management with the extension MultiLanguageManager - Art.122-5
The author or the MultiLanguageManager MediaWiki plugin promotes the MultiLanguageManager and gives a nice overview of the existing solutions.
Template:Languages
Template:Languages uses subpages to link translated articles to the main - english - article.
ParserFunctions extension
This extension is needed by Template:Languages

Comments

blog comments powered by Disqus