Template:UselangLink: Difference between revisions
Template page
More actions
it begins... |
fixing documentation |
||
| Line 1: | Line 1: | ||
<onlyinclude>[{{fullurl:{{FULLPAGENAME}}|uselang={{{1}}}}} {{{text|{{#language:{{{1}}}}}}}}]</onlyinclude> | <onlyinclude>[{{fullurl:{{FULLPAGENAME}}|uselang={{{1}}}}} {{{text|{{#language:{{{1}}}}}}}}]</onlyinclude> | ||
Takes a language code | Takes a mandatory unnamed parameter containing a language code. Returns a link to the corresponding language version of the page it's used on. | ||
The text of the link defaults to the language's [[w:autonym|autonym]], and can be replaced with the optional named parameter {{ | The text of the link defaults to the language's [[w:autonym|autonym]], and can be replaced with the optional named parameter {{code|1={{!}}text=}} | ||
Uses only magic words, should work on any MediaWiki installation. | |||
== Examples == | == Examples == | ||
* {{tlc|UselangLink| | * {{tlc|UselangLink|ja}} yields {{UselangLink|ja}} | ||
* {{tlc|UselangLink| | * {{tlc|UselangLink|ja|2=text=Japanese}} yields {{UselangLink|ja|text=Japanese}} | ||
* {{tlc|UselangLink|INVALID}} yields {{UselangLink|INVALID}} | * {{tlc|UselangLink|INVALID}} yields {{UselangLink|INVALID}} | ||
[[category:helper templates]] | [[category:helper templates]] | ||
[[category:internationalization templates]] | [[category:internationalization templates]] | ||
Revision as of 13:53, 13 January 2010
Takes a mandatory unnamed parameter containing a language code. Returns a link to the corresponding language version of the page it's used on.
The text of the link defaults to the language's autonym, and can be replaced with the optional named parameter |text=
Uses only magic words, should work on any MediaWiki installation.