Template:CountryLanguage: Difference between revisions
(Changed "State of Palestine" to "Palestine".) |
(Added used together links.) |
||
(5 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. The following are used together: | ||
The following are used together: | |||
* [[Template:CountryLanguage]] | * [[Template:CountryLanguage]] | ||
* [[Template:LanguageISO]] | * [[Template:LanguageISO]] | ||
* [[Template:LanguageLocalization]] | * [[Template:LanguageLocalization]] | ||
Line 22: | Line 17: | ||
</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:04, 2 January 2025
Country language lookup template
This will return the major languages based on Country as either the 1st, 2nd, 3rd, or all. The following are used together:
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.