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
more documentation fixing
added "action" parameter
Line 1: Line 1:
<onlyinclude>{{#if:{{{bare|}}}|{{fullurl:{{FULLPAGENAME}}|uselang={{{1}}}}}|[{{fullurl:{{FULLPAGENAME}}|uselang={{{1}}}}} {{{text|{{#language:{{{1}}}}}}}}]}}</onlyinclude>
<onlyinclude>{{#if:{{{bare|}}}
|{{fullurl:{{FULLPAGENAME}}|uselang={{{1}}}{{#if:{{{action|}}}|&{{{action}}}}}}}
|[{{fullurl:{{FULLPAGENAME}}|uselang={{{1}}}}} {{{text|{{#language:{{{1}}}}}}}}]
}}</onlyinclude>


Takes a mandatory unnamed parameter containing a [[m:List of Wikipedias|language code]]. Returns a link to the corresponding language version of the page it's used on.
Takes a mandatory unnamed parameter containing a [[m:List of Wikipedias|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 the optional named parameter {{code|1={{!}}text=}} can be used to replaced it.
The text of the link defaults to the language's [[w:autonym|autonym]], and the optional named parameter {{para|text}} can be used to replaced it.


If the dummy parameter {{code|1={{!}}bare=}} is present, only the target link will be returned.
If the dummy parameter {{para|bare}} is present, only the target link will be returned.
 
The content of the optional named parameter {{para|action}} will be appended to the URL with an "&amp;".


Uses only [[mw:Help:Magic words|magic words]], should work on any MediaWiki installation.
Uses only [[mw:Help:Magic words|magic words]], should work on any MediaWiki installation.

Revision as of 15:25, 19 March 2010

{{{1}}}

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 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 an "&".

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

Examples

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