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:LanguageSelector/link: Difference between revisions

Template page
fix pass-through parameter
m doc in subpage
Line 1: Line 1:
<onlyinclude>{{#switch:{{{2}}}
{{#if:{{{1|}}}|{{#switch:{{{2|}}}
| code=[{{UselangLink|{{{1}}}|bare=1|action={{{action|}}}}} {{lc:{{{1}}}}}]
|code=[{{UselangLink|{{{1|}}}|bare=1|action={{{action|}}}}} {{lc:{{{1|}}}}}]
| yes
|yes|only={{#if:{{{3|}}}|<span id="LanguageSelector-{{{1|}}}" style="display:none">[[File:{{{3|}}}|20x13px|link={{UselangLink|{{{1|}}}|bare=1|action={{{action|}}}}}|alt={{#language:{{{1|}}}}}]]</span>}}{{#ifeq:{{{2|}}}|yes|&thinsp;{{UselangLink|{{{1}}}|action={{{action|}}}}}}}
| only=<span id="LanguageSelector-{{{1}}}" style="display:none">[[File:{{{3}}}|20x13px|link={{UselangLink|{{{1}}}|bare=1|action={{{action|}}}}}|alt={{#language:{{{1}}}}}]]</span>{{#ifeq:{{{2}}}|yes|&thinsp;{{UselangLink|{{{1}}}|action={{{action|}}}}}}}
|#default={{UselangLink|{{{1|}}}|action={{{action|}}}}}
| #default={{UselangLink|{{{1}}}|action={{{action|}}}}}}}</onlyinclude>
}}}}<noinclude>{{documentation}}</noinclude>
 
The optional parameter {{para|action}} will be passed through, if present.

Revision as of 04:27, 17 July 2010

Template documentation[ view · edit · history · purge ]

Displays a link to the current page in displayed in another specified language.

Usage

{{LanguageSelector/link |1= |2= |3= |action= }}

Template parameters

ParameterDescriptionDefaultStatus
1language code, required to display any actual linkemptyoptional
2what to display within the link:
  • code : display only the language code
  • yes : display the language name and the language icon (if any)
  • only : display only the language icon
  • otherwise : display only the language name
emptyoptional
3icon file name (required when parameter 2 is yes or only)emptyoptional
actionoptional action (such as "edit") to include in the target URL. Passed through to {{UselangLink}}emptyoptional

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

Relies on:
{{UselangLink}}

Examples

Code Renders as
"{{LanguageSelector/link|fr}}" "français"
"{{LanguageSelector/link|fr|code}}" "fr"
"{{LanguageSelector/link|fr|yes|Flag of La Francophonie.svg}}" "français"
"{{LanguageSelector/link|fr|only|Flag of La Francophonie.svg}}" ""
"{{LanguageSelector/link}}" ""



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