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

Template page
m Created page with '{{LanguageSelector}} {{TemplateBox |1=action |1d=is passed through to {{tl|LanguageSelector/link}}, and ultimately to {{tl|UselangLink}}. |1def=facultative |1stat=...'
 
 
(4 intermediate revisions by one other user not shown)
Line 1: Line 1:
{{LanguageSelector}}
{{LanguageSelector}}
{{TemplateBox
{{TemplateBox
|1=action
|1=1
|1d=is passed through to {{tl|LanguageSelector/link}}, and ultimately to {{tl|UselangLink}}.
|1d=language code
|1def=facultative
|1def=
|1stat=
|1stat=required
|2=2
|2d=determines what is displayed
* '''yes''': icons and text
* '''only''': only icons, no text
* '''code''': English language codes
* '''anything else''': only text, no icons
|2def=code
|2stat=required
|3=action
|3d=is passed through to {{tl|LanguageSelector/link}}, and ultimately to {{tl|UselangLink}}.
|3def=
|3stat=facultative
|name=LanguageSelector/switch
|name=LanguageSelector/switch
|desc=Selects a default icon.<!-- Ok, this behavior can be delegated to an icon selector -->
|desc=Selects a default icon.<!-- Ok, this behavior can be delegated to an icon selector -->
Line 22: Line 34:
}}
}}


{{DEFAULTSORT:LanguageSelector/switch}}
== Examples ==
{|class="wikitable"
|-
! Code !! Renders as
|-
| <code>"<nowiki>{{</nowiki>{{<noinclude>BASE</noinclude>PAGENAME}}<nowiki>|</nowiki>fr<nowiki>}}</nowiki>"</code>
| "{{ {{<noinclude>BASE</noinclude>PAGENAME}}|fr}}"
|-
| <code>"<nowiki>{{</nowiki>{{<noinclude>BASE</noinclude>PAGENAME}}<nowiki>|</nowiki>fr<nowiki>|</nowiki>code<nowiki>}}</nowiki>"</code>
| "{{ {{<noinclude>BASE</noinclude>PAGENAME}}|fr|code}}"
|-
| <code>"<nowiki>{{</nowiki>{{<noinclude>BASE</noinclude>PAGENAME}}<nowiki>|</nowiki>fr<nowiki>|</nowiki>yes<nowiki>}}</nowiki>"</code>
| "{{ {{<noinclude>BASE</noinclude>PAGENAME}}|fr|yes}}"
|-
| <code>"<nowiki>{{</nowiki>{{<noinclude>BASE</noinclude>PAGENAME}}<nowiki>|</nowiki>fr<nowiki>|</nowiki>only<nowiki>}}</nowiki>"</code>
| "{{ {{<noinclude>BASE</noinclude>PAGENAME}}|fr|only}}"
|-
| <code>"<nowiki>{{</nowiki>{{<noinclude>BASE</noinclude>PAGENAME}}<nowiki>}}</nowiki>"</code>
| "{{ {{<noinclude>BASE</noinclude>PAGENAME}}}}"
|}
<includeonly>
<includeonly>
 
[[Category:Subtemplates]]
</includeonly>
</includeonly>

Latest revision as of 09:24, 24 April 2025

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.