Jump to content
Toggle menu
  • 8 articles
  • 75 files
  • 7 users
  • 37.8K edits
Neodyland Wiki
Toggle preferences menu
Toggle personal menu
Not logged in
Your IP address will be publicly visible if you make any edits.

Template:UselangLink: Difference between revisions

Template page
Examples: fxing
No edit summary
 
(11 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.
  | &amp;{{{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|}}}
 
  | &amp;{{{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|2=ja|3=text=Japanese}} yields {{UselangLink|ja|text=Japanese}}
* {{tlc|UselangLink|2=ja|3=bare=yes}} yields {{UselangLink|ja|bare=yes}}
* {{tlc|UselangLink|INVALID}} yields {{UselangLink|INVALID}}
 
[[category:helper templates]]
[[category:internationalization templates]]

Latest revision as of 22:01, 12 July 2020

English

Template documentation[ view · edit · history · purge ]
This documentation is transcluded from Template:UselangLink/doc.

Returns a link to the corresponding language version of the page it's used on.

Usage

{{UselangLink |1= }}

Template parameters

ParameterDescriptionDefaultStatus
1emptyoptional

Additional information

The template is intended to be used in the following namespaces: no namespace specified

The template is intended to be used by the following user groups: no user group specified

See also

Description

Takes a mandatory unnamed parameter containing a language code.

The text of the link defaults to the language's autonym, and the optional named parameter |text= can be used to replaced it.

If the dummy parameter |bare= is present, only the target link will be returned.

The content of the optional named parameter |action= will be appended to the URL with a leading "&".

Uses only magic words, should work on any MediaWiki installation.

Examples

Cookies help us deliver our services. By using our services, you agree to our use of cookies.