Template:LangSwitch/testcases

From Wikimedia Commons, the free media repository
Jump to: navigation, search
legend
{{LangSwitch/sandbox}} results
{{LangSwitch}} results
Desired results
Test Code lang=en lang=fr lang=co
no En; default
{{LangSwitch|fr=French|default=default}}
default French French
default French French
default French French
no En ; no default
{{LangSwitch|fr=French|co=Corsu}}
[1] French[1] Corsu[1]
[1] French[1] Corsu[1]
[1] French[1] Corsu[1]
En; default
{{LangSwitch|en=English|co=Corsu|default=default}}
English default Corsu
English default Corsu
English default Corsu
En; no default
{{LangSwitch|en=English|co=Corsu}}
English English Corsu
English English Corsu
English English Corsu
empty En; default
{{LangSwitch|en=~|fr=French|default=default}}
French French
French French
French French
empty En; no default
{{LangSwitch|en=~|fr=French}}
French French
French French
French French
En; default; empty Fr
{{LangSwitch|en=English|fr=~|co=Corsu|default=default}}
English Corsu
English Corsu
English Corsu
En; default; empty Fr
{{LangSwitch|en=English|fr=|co=Corsu|default=default}}
English default Corsu
English default Corsu
English default Corsu
En; no default; empty Fr
{{LangSwitch|en=English|fr=~|co=Corsu}}
English Corsu
English Corsu
English Corsu
simple case with "lang="
{{LangSwitch|en=English|fr=French|co=Corsu|default=default|lang=}}
English English English
English English English
English English English
fallback from nds (nds-> nl nds-nl -> nl)
{{LangSwitch/sandbox|en=English|nds-nl=Low Saxon (Netherlands)|default=default|lang=nds}}
Low Saxon (Netherlands) Low Saxon (Netherlands) Low Saxon (Netherlands)
Low Saxon (Netherlands) Low Saxon (Netherlands) Low Saxon (Netherlands)
Low Saxon (Netherlands) Low Saxon (Netherlands) Low Saxon (Netherlands)
fallback to en when fallback language not provided
{{LangSwitch|lang=co|en=English}}
English English English
English English English
English English English

Fallback test[edit]

Code Output
{{LangSwitch|en=English|nds=Low German|default=default|lang=nds}} Low German
{{LangSwitch|en=English|de=German|default=default|lang=nds}} German
  1. a b c d e f g h i add [[Category:LangSwitch template without English version]]