I did some research for you, and all I could find are some javascript variable methods of accessing the user's language preference:
wgUserLanguage:
http://www.mediawiki.org/wiki/Manual:Interface/JavaScript
With some different info here:
http://www.mediawiki.org/wiki/Language_in_MediaWiki
Unfortunately, that requires you to load some javascript to obtain the user's language preference. Maybe you can copy a simple function from somewhere that already does the detection part, and then use it to show or hide different text in different languages?
This extension seems to do user language preference checks, so maybe you can borrow some code from it:
http://www.mediawiki.org/wiki/Extension:AutoLanguage
I'm sure someone has thought of this before. I seem to remember seeing templates over at Commons or Meta that did it, so maybe there is a better, easier way. Hopefully this info is still useful though.
"Thomas Uwe Grüttmüller" wrote:
badon fastgoldfish@gmail.com wrote:
I would have been surprised if it had functioned for you. It seems interest in diverse translation extensions has mostly been dropped in favor of this one:
That extension seems to have a different purpose though. :-(
Now I tried this one (with the ParserFunctions extension):
{{#switch: {{CONTENTLANGUAGE}} | de = Das Wiki-Liederbuch für freie Musik… | es = El cancionero wiki de música libre… | ru = Вики песенник свободной музыки… | case = result | case = result | case = result | The wiki song book for free music… }}
The basic construct seems to work, but {{CONTENTLANGUAGE}} is always “en”. I need a variable that gives me the language selected by the user.
-- Thomas
NEU: FreePhone - 0ct/min Handyspartarif mit Geld-zurück-Garantie! Jetzt informieren: http://www.gmx.net/de/go/freephone
MediaWiki-l mailing list MediaWiki-l@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-l