Template:CountryLanguage: Difference between revisions
(Changed "State of Palestine" to "Palestine".) |
(Corrected Cabo Verde, Cambodia, Cameroon, & Canada) |
||
(7 intermediate revisions by the same user not shown) | |||
Line 1: | Line 1: | ||
<noinclude> | <noinclude> | ||
<big>'''Country language lookup template'''</big><br> | <big>'''Country language lookup template'''</big><br> | ||
This will return the major languages based on Country as either the 1st, 2nd, 3rd, or all. | This will return the major languages based on Country as either the 1st, 2nd, 3rd, or all. | ||
Line 22: | Line 14: | ||
</noinclude><includeonly>{{#switch: {{{1|}}} | |||
| Afghanistan = {{#switch: {{{2|1}}} | 3 = {{#explode:Persian;Pashto|;|2}} | 2 = {{#explode:Persian;Pashto|;|1}} | all = Persian;Pashto| {{#explode:Persian;Pashto|;|0}} }} | |||
| Albania = {{#switch: {{{2|1}}} | 3 = {{#explode:Albanian|;|2}} | 2 = {{#explode:Albanian|;|1}} | all = Albanian| {{#explode:Albanian|;|0}} }} | |||
| Algeria = {{#switch: {{{2|1}}} | 3 = {{#explode:Arabic;Berber|;|2}} | 2 = {{#explode:Arabic;Berber|;|1}} | all = Arabic;Berber| {{#explode:Arabic;Berber|;|0}} }} | |||
<!-- No Match Returns Blank --> | <!-- No Match Returns Blank --> | ||
| | | | ||
}}</includeonly> | }}</includeonly> |
Revision as of 18:30, 10 December 2024
Country language lookup template
This will return the major languages based on Country as either the 1st, 2nd, 3rd, or all.
Usage:
{{CountryLanguage|<Country_Name>|<1,2,3,all>}}
The country is mandatory, if the primary (1st), secondary (2nd), tertiary (3rd), or all is blank, it assumes the primary language.