Template:Continent code
Appearance
The continent code template will return an abbreviation to sort tables by location. It uses the 7-continent system common in English-speaking countries. It has 3 advantages over typing an abbreviation into the table cell:
- It creates wikilinks for accessibility.
- For consistency, the template applies to all places on Earth. It uses the inclusive Oceania. Anywhere in the world can be prefixed by one of these seven designations. The template also includes two esoteric prefixes.
- IC (intercontinental) covers entries between or across continents.
- OS (outer space) covers entries beyond Earth.
- To sort by country, use a country's name as the argument. The template will choose the continent abbreviation. It will also append hidden text for sorting. See the Country names section below for examples.
Usage
[edit]The template accepts one argument. This can be a 2-letter code listed below, a continent's name, or a country's name. Within a single table, only use the country or the continent for correct sorting.
Type | Wikitext | Output |
---|---|---|
code | {{continent code |NA}} | NA |
continent | {{continent code |North America}} | NA |
country | {{continent code |Mexico}} | NA |
Examples
[edit]2-letter continent codes
[edit]Continent | Markup | Output |
---|---|---|
Africa | {{continent code |AF}}
|
AF |
Antarctica | {{continent code |AN}}
|
AN |
Asia | {{continent code |AS}}
|
AS |
Europe | {{continent code |EU}}
|
EU |
North America | {{continent code |NA}}
|
NA |
Oceania | {{continent code |OC}}
|
OC |
South America | {{continent code |SA}}
|
SA |
intercontinental | {{continent code |IC}}
|
IC |
outer space | {{continent code |OS}}
|
OS |
Continent names
[edit]Usage | Markup | Output |
---|---|---|
full name | {{continent code |Oceania}}
|
OC |
alternate name | {{continent code |Australia}}
|
OC |
island nation | {{continent code |New Zealand}}
|
OC |
Country names
[edit]Location | Population |
---|---|
NA : Mexico City, Mexico | 9,209,944 |
EU : London, England | 8,799,800 |
NA : Buffalo, New York, U.S. | 278,349 |
EU : Vienna, Austria | 1,951,354 |
AF : Cairo, Egypt | 10,100,166 |
NA : New Orleans, Louisiana, U.S. | 383,997 |
NA : Acapulco de Juárez, Mexico | 687,608 |
See also
[edit]TemplateData
[edit]This template returns an abbreviation to sort tables by location. It uses the 7-continent system.
Parameter | Description | Type | Status | |
---|---|---|---|---|
Location | 1 | Enter a country's name, continent's name, or 2-letter continent code (AF, AN, AS, EU, OC, NA, or SA) as the template's only parameter.
| String | required |