Badon, thanks for your help. Unfortunately, I don't speak PHP or JavaScript, 
but at least I managed to create a very crude patch for 
includes/parser/Parser.php

Original version:
  8< - - - - -
                        case 'contentlanguage':
                               global $wgContLanguageCode;
                               return $wgContLanguageCode;
  - - - - - >8

Modified version:
  8< - - - - -
                        case 'contentlanguage':
                                global $wgLang;
                                return $wgLang->getCode();
  - - - - - >8

So now this works:
  8< - - - - -
{{#switch: {{Language}}
 | de = Das Wiki-Liederbuch für freie Musik…
 | es = El cancionero wiki de música libre…
 | ru = Вики песенник свободной музыки…
 | nds = Dat Wiki-Leederböök för frie Musik…
 | case = result
 | case = result
 | The wiki song book for free music…
}}
  - - - - - >8

Template:Language is 
  8< - - - - -
{{CONTENTLANGUAGE}}
  - - - - - >8

for now.

The language is chosen with the LanguageSelector extension.
The “#switch:” requires the ParserFunctions extension.

That's all.

Bye,
-- Thomas


-- 
Empfehlen Sie GMX DSL Ihren Freunden und Bekannten und wir
belohnen Sie mit bis zu 50,- Euro! https://freundschaftswerbung.gmx.de

_______________________________________________
MediaWiki-l mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-l

Reply via email to