Extension:Multilang

Multilang is a multi language extension for MediaWiki using tag for selective text display depending on user language settings. It is inspired by the Multilanguage extension which sadly does not work on newer MediaWiki systems and which has some bugs that led to this rewrite.

This extension can be combined with the LanguageSelector extension, and perhaps Polyglot, for more comprehensive support of multilingual content.

Usage
Especially small parts of texts like in templates (where you are forced to use exactly the same template name) can efficiently and easily be made multilingual using the Multilang extension. You can use it the following way:

@de|"Das ist ein deutscher Text." @en|"This is an English text."

On a wiki that has this extension you will see depending on your user language setting (from Special:Preferences) either only the message in your language or if this is not existing the default system language. If your preferred language and the fallback language is not among the provided alternatives the extension shows the first text alternative as default. If you're interested to know your own language setting you can use: It will display the language codes of the preferred language and the default language, separated by a comma.

Installation
You need at least MediaWiki 1.7 (people also reported that it works on MediaWiki 1.6.8, the latest version of 1.6.x series) in order to run this MediaWiki extension.

Download the multilang files, extract them and copy Multilang.php and Multilang.class.php into your extension folder and include it from your LocalSettings.php with: require_once("extensions/Multilang.php");

You can configure the plugin setting the $wgMultilangUseBrowserLanguage variable in LocalSettings.php. $wgMultilangUseBrowserLanguage = true; will respect browser language setting of the wiki user instead of the user language setting in the wiki. Default is $wgMultilangUseBrowserLanguage = false; and thus using the user language settings from the wiki.

The browser language method has the advantage that you have more than one fallback language in case no text alternative in your favorite language was found. However this feature is not very much tested and might could cause some confusion if the user language setting in the wiki differs from the browser language setting.

TODO

 * Check entered language codes for validity (using Names.php) and throw a nice red parse error in case not.
 * Reader should be able to expand the list (via a small GUI-link) so that they can see the text in all languages and be able to switch the displayed text to any language, without influencing the interface language itself.