Difference between revisions of "Template:Country2continent/doc"

From blackwiki
Jump to navigation Jump to search
imported>Le Deluge
(→‎See also: updates)
imported>BrownHairedGirl
(cleanup, note new optional parameter {{{2nd|}}})
 
Line 1: Line 1:
 
{{Documentation subpage}}
 
{{Documentation subpage}}
 
<!-- Please place categories where indicated at the bottom of this page and interwikis at Wikidata (see [[Wikipedia:Wikidata]]) -->
 
<!-- Please place categories where indicated at the bottom of this page and interwikis at Wikidata (see [[Wikipedia:Wikidata]]) -->
 +
Combines {{tl|Iso2continent}} and {{tl|ISO 3166 code}} to generate a continent from a country parameter
 
== Usage ==
 
== Usage ==
Combines {{tl|Iso2continent}} and {{tl|ISO 3166 code}} to generate a continent from a country parameter, eg:
+
<code><nowiki>{{Country2continent|Countryname}}
::<code><nowiki>{{Country2continent|Benin}}</nowiki></code> -> {{Country2continent|Benin}}
+
e.g.
::<code><nowiki>{{Country2continent|England}}</nowiki></code> -> {{Country2continent|England}}
+
 
 +
*<code><nowiki>{{Country2continent|Benin}}</nowiki></code> → {{Country2continent|Benin}}
 +
*<code><nowiki>{{Country2continent|England}}</nowiki></code> → {{Country2continent|England}}
 +
 
 +
The optional parameter {{para|2nd|yes}} is used to generate the second continent, for a country which is in more than one continent, e.g.:
 +
*<code><nowiki>{{Country2continent|Russia}}</nowiki></code> {{Country2continent|Russia}}
 +
*<code><nowiki>{{Country2continent|Russia|2nd=yes}}</nowiki></code> {{Country2continent|Russia|2nd=yes}}
 +
 
 
== See also ==
 
== See also ==
 
* {{tl|Continent2continental}}
 
* {{tl|Continent2continental}}
Line 10: Line 18:
 
* {{tl|Country2nationality}}
 
* {{tl|Country2nationality}}
 
* {{tl|GetCountryNameFromAdjective}}
 
* {{tl|GetCountryNameFromAdjective}}
 +
* {{tl|GetAdjectiveFromCountryName}}
 
* {{tl|Find country}} - finds the name of a country or continent within text
 
* {{tl|Find country}} - finds the name of a country or continent within text
 
* {{tl|Title country}} - applies Findcountry to PAGENAME
 
* {{tl|Title country}} - applies Findcountry to PAGENAME

Latest revision as of 05:53, 16 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