|
|
| (12 intermediate revisions by 4 users not shown) |
| Line 1: |
Line 1: |
| <onlyinclude>{{#if:{{{bare|}}}|{{fullurl:{{FULLPAGENAME}}|uselang={{{1}}}}}|[{{fullurl:{{FULLPAGENAME}}|uselang={{{1}}}}} {{{text|{{#language:{{{1}}}}}}}}]}}</onlyinclude>
| | {{#if: {{{bare|}}} |
| | | | {{fullurl:{{FULLPAGENAME}}|uselang={{lc:{{{1|}}}}}{{#if: {{{action|}}} |
| Takes a mandatory unnamed parameter containing a language code. Returns a link to the corresponding language version of the page it's used on.
| | | &{{{action|}}} |
| | | }}}} |
| 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=}}
| | | <span class="plainlinks">[{{fullurl:{{FULLPAGENAME}}|uselang={{lc:{{{1}}}}}}}{{#if: {{{action|}}} |
| | | | &{{{action|}}} |
| If the dummy parameter {{code|1={{!}}bare=}} is present, only the target link will be returned.
| | }} <bdi {{#if: {{{text|}}}|| lang="{{lc:{{{1|}}}}}" }} title="{{#language:{{lc:{{{1|}}}}}|{{Int:Lang}}}}">{{#if: {{{text|}}} |
| | | | {{{text|}}} |
| Uses only [[mw:Help:Magic words|magic words]], should work on any MediaWiki installation.
| | | {{#language:{{lc:{{{1|}}}}}}} |
| | | }}</bdi>]</span> |
| == Examples ==
| | }}<noinclude>{{Documentation}}</noinclude> |
| * {{tlc|UselangLink|ja}} yields {{UselangLink|ja}}
| |
| * {{tlc|UselangLink|ja|2=text=Japanese}} yields {{UselangLink|ja|text=Japanese}}
| |
| * {{tlc|UselangLink|ja|2=bare=yes}} yields {{UselangLink|ja|bare=yes}}
| |
| * {{tlc|UselangLink|INVALID}} yields {{UselangLink|INVALID}}
| |
| | |
| [[category:helper templates]]
| |
| [[category:internationalization templates]]
| |