Template:Country: Difference between revisions
Content deleted Content added
LincolnBot (talk | contribs) m →Examples: clean up using AWB: spacing / header formatting |
LincolnBot (talk | contribs) m link updates, replaced: <tvar name=country>{{country|fr}}</tvar> → <tvar name="country">{{country|fr}}</tvar>, replaced: [[:w:en:List of ISO 3166 country codes| → [[{{lwp|List of ISO 3166 country codes}}| |
||
Line 5: | Line 5: | ||
Displays the localized name of a country. This is useful in tables or infoboxes. |
Displays the localized name of a country. This is useful in tables or infoboxes. |
||
As first parameter you may give the full English country name or its alpha-2 or alpha- 3 digit [[ |
As first parameter you may give the full English country name or its alpha-2 or alpha- 3 digit [[{{lwp|List of ISO 3166 country codes}}|ISO-3166-1 code]]. |
||
Pages calling for a country or ISO code missing from this template will appear in [[:Category:Pages with missing country in Template:Country]]. |
Pages calling for a country or ISO code missing from this template will appear in [[:Category:Pages with missing country in Template:Country]]. |
||
Line 13: | Line 13: | ||
=== Examples === |
=== Examples === |
||
<code><nowiki>Origin country: <tvar name=country>{{country|fr}}</tvar></nowiki></code> gives "Origin country: {{country|fr}}" |
<code><nowiki>Origin country: <tvar name="country">{{country|fr}}</tvar></nowiki></code> gives "Origin country: {{country|fr}}" |
||
<code><nowiki>{{country|United States of America}}</nowiki></code> gives "{{country|United States of America}}" |
<code><nowiki>{{country|United States of America}}</nowiki></code> gives "{{country|United States of America}}" |
Revision as of 18:10, 25 March 2024
Template documentation
Usage
Displays the localized name of a country. This is useful in tables or infoboxes.
As first parameter you may give the full English country name or its alpha-2 or alpha- 3 digit ISO-3166-1 code.
Pages calling for a country or ISO code missing from this template will appear in Category:Pages with missing country in Template:Country.
Translations come from Wikidata utilizing the {{Label}} template.
Examples
Origin country: {{country|fr}}
gives "Origin country: France"
{{country|United States of America}}
gives "United States of America"
Note: this template would gain to be turned into a parser function using CLDR.
{{{1}}}