Difference between revisions of "Template:Country"
(Add to and improve documentation) |
(More documentation updates and copyedits) |
||
| Line 97: | Line 97: | ||
|} | |} | ||
</includeonly><noinclude> | </includeonly><noinclude> | ||
| − | {{TemplateDoc|pages= | + | {{TemplateDoc|pages=Articles about countries, states, or territories|purpose=Info box|cat=}} |
{{Parms| | {{Parms| | ||
| − | {{Parm|name|name of country|no|Defaults to page name}} | + | {{Parm|name|name of country, state, or territory|no|Defaults to page name}} |
{{Parm|map|map image|no|}} | {{Parm|map|map image|no|}} | ||
{{Parm|flag|flag image|no|}} | {{Parm|flag|flag image|no|}} | ||
| Line 106: | Line 106: | ||
{{Parm|capital-raw|Capital|no|See note A}} | {{Parm|capital-raw|Capital|no|See note A}} | ||
{{Parm|government|Type of government|no|Is automatically linked}} | {{Parm|government|Type of government|no|Is automatically linked}} | ||
| − | {{Parm|government-raw|Type | + | {{Parm|government-raw|Type of government|no|See note A}} |
{{Parm|language|Official language|no|Is automatically linked (see note B)}} | {{Parm|language|Official language|no|Is automatically linked (see note B)}} | ||
{{Parm|king|King|no|Is automatically linked. See note C}} | {{Parm|king|King|no|Is automatically linked. See note C}} | ||
{{Parm|queen|Queen|no|Is automatically linked. See note C}} | {{Parm|queen|Queen|no|Is automatically linked. See note C}} | ||
| − | {{Parm|monarch-raw|Monarch|no|See | + | {{Parm|monarch-raw|Monarch|no|See notes A and C}} |
{{Parm|governor general|Governor General|no|Is automatically linked}} | {{Parm|governor general|Governor General|no|Is automatically linked}} | ||
{{Parm|governor general-raw|Governor General|no|See note A}} | {{Parm|governor general-raw|Governor General|no|See note A}} | ||
| Line 155: | Line 155: | ||
'''B:''' The language field is automatically linked to an article named "''<language>'' language". | '''B:''' The language field is automatically linked to an article named "''<language>'' language". | ||
| − | '''C:''' Both the ''king'' and ''queen'' parameters display as a ''Monarch'' row, but prepend "King" or "Queen" to the name of the monarch. If neither is required, use the ''monarch-raw'' | + | '''C:''' Both the ''king'' and ''queen'' parameters display as a ''Monarch'' row, but prepend "King" or "Queen" to the name of the monarch. If neither is required, use the ''monarch-raw'' parameter. |
==Full code== | ==Full code== | ||
Revision as of 02:34, October 17, 2007
| Template: Country | |
|---|---|
| Use on | Articles about countries, states, or territories |
| Use for | Info box |
| Category template applies to page | (none) |
| Template Parameters (See using templates). | |||
|---|---|---|---|
| Name | Purpose | Required? | Comment |
| name | name of country, state, or territory | no | Defaults to page name |
| map | map image | no | |
| flag | flag image | no | |
| arms | Coat of arms | no | |
| capital | Capital | no | Is automatically linked |
| capital-raw | Capital | no | See note A |
| government | Type of government | no | Is automatically linked |
| government-raw | Type of government | no | See note A |
| language | Official language | no | Is automatically linked (see note B) |
| king | King | no | Is automatically linked. See note C |
| queen | Queen | no | Is automatically linked. See note C |
| monarch-raw | Monarch | no | See notes A and C |
| governor general | Governor General | no | Is automatically linked |
| governor general-raw | Governor General | no | See note A |
| president | President | no | Is automatically linked |
| president-raw | President | no | See note A |
| chancellor | Chancellor | no | Is automatically linked |
| chancellor-raw | Chancellor | no | See note A |
| pm | Prime Minister | no | Is automatically linked |
| pm-raw | Prime Minister | no | See note A |
| chairman | Chairman | no | Is automatically linked |
| governor | Governor | no | Is automatically linked |
| governor-raw | Governor | no | See note A |
| premier | Premier | no | Is automatically linked |
| premier-raw | Premier | no | See note A |
| area | Area of country | no | |
| pop | Population | no | |
| pop-basis | Basis of population (e.g. "2004 census") | yes | Only required if pop is supplied |
| gdp | GDP | no | |
| gdp-year | GDP year | yes | Only required if gdp is supplied |
| gdp-pc | GDP per capita | no | |
| currency | Currency | no | |
| idd | International dialing code | no | |
| tld | Internet top-level domain | no | |
The country infobox template is currently used for countries, states, and territories (the {{state}} template redirects to this template). However, it is possible that {{state}} may be an independent template in the future, so {{state}}, not this template, should be used for a state infobox.
The template is not especially complex (but is reasonably so), but includes a large list of optional parameters.
Many of the parameters have two alternative forms, which are explained below in note A.
Notes
A: Parameters of the form xxxx-raw are alternatives to the non-raw form. These should be used instead of the non-raw form to (a) provide links where the article name is different to the displayed name, or (b) where a link is not wanted.
For example, if the capital of a country is Washington, but the page name for that capital is Washington D.C., then you would type capital-raw=[[Washington D.C.|Washington]].
If, instead, the page name is simply Washington, then capital=Washington is all that is needed, and will automatically be linked.
If both non-raw and raw forms are supplied, the non-raw form will be ignored.
B: The language field is automatically linked to an article named "<language> language".
C: Both the king and queen parameters display as a Monarch row, but prepend "King" or "Queen" to the name of the monarch. If neither is required, use the monarch-raw parameter.
Full code
{{Country
|name =
|map =
|flag =
|arms =
|capital =
|capital-raw =
|government =
|government-raw =
|language =
|king =
|queen =
|monarch-raw =
|governor general=
|governor general-raw=
|president =
|president-raw =
|chancellor =
|chancellor-raw =
|pm =
|pm-raw =
|chairman =
|governor =
|governor-raw =
|premier =
|premier-raw =
|area =
|pop =
|pop-basis =
|gdp =
|gdp-year =
|gdp-pc =
|currency =
|idd =
|tld =
}}