Forum:Template changing depending on viewer's language

Hello. I'd like to have a template which will switch to a certain thing depending on the skin language of the viewer. I know the basics: Now the problem is, what is the key value ("???" above) supposed to be? – Smiddle / talk 18:39, 21 May 2007 (UTC)
 * That would be &#123;&#123;CONTENTLANGUAGE&#125;&#125; ―  T hailog  19:07, 21 May 2007 (UTC)
 * I thought that was the wiki's language? ~Dantman(talk) tricks May 21, 2007 @ 19:16 (UTC)
 * Yeah, I've seen some other one trying with CONTENTLANGUAGE on a French wiki. No matter what language the skin was set to; it always showed French. – Smiddle / talk 20:03, 21 May 2007 (UTC)
 * There is no such magic word and probably never will be (example of it being removed by brion). There are cache issues apparently. You'll have to rely on javascript. There are two variables that return user language and content language (below). --Splarka (talk) 06:42, 22 May 2007 (UTC)

var wgUserLanguage = "en"; var wgContentLanguage = "en";


 * At Uncyclopedia, I once tried doing something with, which is made completely out of JavaScript. It didn't work. But I'll try that. How do I activate the tag? – Smiddle / talk 14:55, 22 May 2007 (UTC)
 * Well, that isn't as simple. You can't use javascript to make a new magic word (as parserfunctions like are server-side and javascript is client-side). --Splarka (talk) 06:14, 23 May 2007 (UTC)
 * So... what should I do to make this work? – Smiddle / talk 16:11, 23 May 2007 (UTC)
 * Well, give me a specific example of what you need to switch. Remember, this has to be processed client-side so all the info must be available (unlike which can use transclusions and #ifexist's). --Splarka (talk) 06:23, 24 May 2007 (UTC)
 * Making something change to "dansk" in Norwegian or Danish, "danskt" in Faroese, and "danska" in Icelandic or Swedish on c:Scanime perhaps. That would be useful. – Smiddle / talk 15:00, 24 May 2007 (UTC)