Template:LanguageSelector/switch/doc: Difference between revisions
Template page
More actions
mNo edit summary |
|||
| (3 intermediate revisions by one other user not shown) | |||
| Line 6: | Line 6: | ||
|1stat=required | |1stat=required | ||
|2=2 | |2=2 | ||
|2d=''yes'' | |2d=determines what is displayed | ||
|2def= | * '''yes''': icons and text | ||
* '''only''': only icons, no text | |||
* '''code''': English language codes | |||
* '''anything else''': only text, no icons | |||
|2def=code | |||
|2stat=required | |2stat=required | ||
|3=action | |3=action | ||
| Line 30: | Line 34: | ||
}} | }} | ||
{{ | == 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
| Parameter | Description | Default | Status | |
|---|---|---|---|---|
1 | language code | empty | required | |
2 | determines what is displayed
| code | required | |
action | is passed through to {{LanguageSelector/link}}, and ultimately to {{UselangLink}}. | empty | optional | |
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}}"
|
"fr]"
|
"{{LanguageSelector/switch|fr|yes}}"
|
" |
"{{LanguageSelector/switch|fr|only}}"
|
" |
"{{LanguageSelector/switch}}"
|
"" |