Author: arnomane
Description:
Currently in Wikimedia Commons you cannot localise a template like {{Information}} as you would need to embedd another
translated template with another name. Currently some people are using very fragile Javascript hacks to selectively display
only certain languages of a template containing let us say 40 translations. For example here:
http://meta.wikimedia.org/wiki/Meta:Language_select
http://meta.wikimedia.org/wiki/Template:Stub
I came accross and did rewrite a MediaWiki extension that would directly enable selective display of multilingual text in
MediaWiki without needing some often not working JS hacks. You can find it at
http://www.mediawiki.org/wiki/Extension:Multilang and can directly download it at http://download.pakanto.org/software/
It is using the following syntax (of course not restricted to german or english):
<multilang>
@de|"Das ist ein deutscher Text."
@en|"This is an English text."
</multilang>
On a wiki that has this extension enabled you will see depending from 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 prefered language and
the fallback language is not among the provided alternatives the extension shows the first text alternative as default.
You can see the template in action here:
http://pakanto.org/wiki/Pakanto:Mediawiki_help
http://pakanto.org/wiki/Template:Category_scheme (see source code of template)
As this is my first program in PHP I am aware that I did probably make some foolish errors but I am very much interested in
improving this (if necessary) as this is a quite important feature that would help multilingual wikis like Wikimedia Commons
and Meta a lot. And of course my extension "just works for me (TM)".
Version: unspecified
Severity: enhancement
URL: http://www.mediawiki.org/wiki/Extension:Multilang