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

Template page
added remark
No edit summary
 
(31 intermediate revisions by 4 users not shown)
Line 1: Line 1:
{{#if:{{{1}}}
{{LanguageSelector/link|1={{{1|}}}|2={{{2|}}}|3={{LanguageSelector/iconfile|1={{{1|}}}}}|action={{{action|}}}}}<noinclude>{{Documentation}}</noinclude>
|{{#if:{{{2}}}<noinclude>only do something if two unnamed parameters are present</noinclude>
|{{#switch:{{{1}}}
|en={{../link|{{{1}}}|{{{2}}}|English|File:English language.svg}}
|de={{../link|{{{1}}}|{{{2}}}|Deutsch|File:German-Language-Flag.svg}}
|zh={{../link|{{{1}}}|{{{2}}}|中文|Flag of chinese-speaking countries and territories.svg}}
}}
}}
}}<noinclude>Don't forget to update {{tl|../full}} when you add a new language!</noinclude>

Latest revision as of 05:03, 13 July 2020

Template documentation[ view · edit · history · purge ]

Selects a default icon.

Usage

{{LanguageSelector/switch |1= |2= |action= }}

Template parameters

ParameterDescriptionDefaultStatus
1language codeemptyrequired
2determines what is displayed
  • yes: icons and text
  • only: only icons, no text
  • code: English language codes
  • anything else: only text, no icons
coderequired
actionis passed through to {{LanguageSelector/link}}, and ultimately 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:
{{LanguageSelector/link}}

Examples

Code Renders as
"{{LanguageSelector/switch|fr}}" "français"
"{{LanguageSelector/switch|fr|code}}" "français [fr]"
"{{LanguageSelector/switch|fr|yes}}" "françaisfrançais"
"{{LanguageSelector/switch|fr|only}}" "français"
"{{LanguageSelector/switch}}" ""
Cookies help us deliver our services. By using our services, you agree to our use of cookies.