Difference between revisions of "Template:Multilingual switch"
From OpenMedia
m (Created page with "<noinclude>A simple utility template to output various languages depending on the user-selected language. It uses the <nowiki>{{int:language}}</nowiki> parser function for this (...") |
m |
||
Line 2: | Line 2: | ||
== USAGE == | == USAGE == | ||
− | <nowiki>{{Multilingual|de=Deutscher Text|en=English text}}</nowiki> results in | + | <nowiki>{{Multilingual switch|de=Deutscher Text|en=English text}}</nowiki> results in |
− | {{Multilingual|de=Deutscher Text|en=English text}} | + | {{Multilingual switch|de=Deutscher Text|en=English text}} |
− | [[Category: | + | [[Category:Internationalization templates]] |
− | + | ||
</noinclude>{{#switch:{{int:language}}<!-- | </noinclude>{{#switch:{{int:language}}<!-- | ||
-->|Sprache={{{de|{{{en|}}}}}}<!-- | -->|Sprache={{{de|{{{en|}}}}}}<!-- | ||
-->|#default={{{en|}}} | -->|#default={{{en|}}} | ||
}} | }} |
Revision as of 12:59, 17 January 2011
A simple utility template to output various languages depending on the user-selected language. It uses the {{int:language}} parser function for this ({{CONTENTLANGUAGE}} isn't changed according to user’s settings but is a wiki-wide setting, defined in Localsettings.php and variable $wgLanguageCode.) Presently defined only for German/English, but easily extendable. English is default.
USAGE
{{Multilingual switch|de=Deutscher Text|en=English text}} results in English text