From MediaWiki.org
Jump to navigation Jump to search
MediaWiki extensions manualManual:Extensions
Crystal Clear action run.svg

Release status:Extension status unmaintained

ImplementationTemplate:Extension#type Tag, Locale
DescriptionTemplate:Extension#description A multilanguage extension
Author(s)Template:Extension#username Daniel Arnold
Latest versionTemplate:Extension#version 0.11 (2006-01-17)
MediaWikiTemplate:Extension#mediawiki > 1.7 (1.6.10) < 1.16
LicenseTemplate:Extension#license GPL
Download Template:WikimediaDownload/svn
Hooks usedTemplate:Extension#hook

Translate the Multilang extension if it is available at translatewiki.net

Check usage and version matrix.

Multilang is a multi language extension for MediaWiki using <multilang> 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.


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:

<multilang />

It will display the language codes of the preferred language and the default language, separated by a comma.


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.

It seems not to work starting from MediaWiki 1.17, it was with MediaWiki 1.16 (see discussion page).

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( "$IP/extensions/Multilang/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.

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


  • 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.

See also[edit]