Difference between revisions of "Template:Country2continent"
Jump to navigation
Jump to search
imported>MusikBot II m (Protected "Template:Country2continent": High-risk template or module (more info) ([Edit=Require autoconfirmed or confirmed access] (indefinite))) |
imported>BrownHairedGirl (Czechoslovakia = Europe) |
||
| Line 1: | Line 1: | ||
| − | <includeonly>{{trim|{{#ifeq:{{str len|{{ISO 3166 code|{{{1}}}}}}}|2|{{Iso2continent| {{ISO 3166 code|{{{1}}}}} }}| {{#if:{{{1|}}}| {{#switch: {{{1}}} | England = Europe | Scotland = Europe | Wales = Europe | Catalonia = Europe }}}}}}}}</includeonly><noinclude>{{documentation}}[[Category:String manipulation templates]][[Category:Country templates]] | + | <includeonly>{{trim|{{#ifeq:{{str len|{{ISO 3166 code|{{{1}}}}}}}|2|{{Iso2continent| {{ISO 3166 code|{{{1}}}}} }}| {{#if:{{{1|}}}| {{#switch: {{{1}}} | England = Europe | Scotland = Europe | Wales = Europe | Catalonia = Europe | Czechoslovakia = Europe }}}}}}}}</includeonly><noinclude>{{documentation}}[[Category:String manipulation templates]][[Category:Country templates]] |
</noinclude> | </noinclude> | ||
Revision as of 21:33, 3 September 2020
Combines {{Iso2continent}} and {{ISO 3166 code}} to generate a continent from a country parameter
Usage
{{Country2continent|Countryname}}
e.g.
*<code><nowiki>{{Country2continent|Benin}} →
{{Country2continent|England}}→ Europe
The optional parameter |2nd=yes is used to generate the second continent, for a country which is in more than one continent, e.g.:
{{Country2continent|Russia}}→{{Country2continent|Russia|2nd=yes}}→
See also
- {{Continent2continental}}
- {{Country2continental}}
- {{Country2nationality}}
- {{GetCountryNameFromAdjective}}
- {{GetAdjectiveFromCountryName}}
- {{Find country}} - finds the name of a country or continent within text
- {{Title country}} - applies Findcountry to PAGENAME
| The above documentation is transcluded from Template:Country2continent/doc. (edit | history) Editors can experiment in this template's sandbox (create | mirror) and testcases (create) pages. Please add categories to the /doc subpage. Subpages of this template. |