Template:Country: Difference between revisions

From Wikimedia Foundation Governance Wiki
Content deleted Content added
m →‎Usage: fix links using AWB, replaced: [[w: → [[:w:
No edit summary
Tag: 2017 source edit
 
(3 intermediate revisions by one other user not shown)
Line 1: Line 1:
<noinclude>
<noinclude>
{{documentation|content=
{{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 [[:w:en: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]].

Translations come from [[Wikidata]] utilizing the {{tl|Label}} template.

=== Examples ===

<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}}"

Note: this template would gain to be turned into a parser function using CLDR.

[[Category:Templates that provide common messages{{#translation:}}]]
}}
</noinclude>{{#switch:{{{1}}}
</noinclude>{{#switch:{{{1}}}
| Afghanistan |af |afg = {{LabelT|Q889}}
| Afghanistan |af |afg = {{LabelT|Q889}}
Line 70: Line 50:
| Democratic Republic of the Congo |DR Congo |Congo-Kinshasa |cod |cd = {{LabelT|Q974}}
| Democratic Republic of the Congo |DR Congo |Congo-Kinshasa |cod |cd = {{LabelT|Q974}}
| Republic of the Congo |Congo-Brazzaville |cog |cg = {{LabelT|Q971}}
| Republic of the Congo |Congo-Brazzaville |cog |cg = {{LabelT|Q971}}
| Cote d'Ivoire |Côte d'Ivoire |Côte d’Ivoire |civ |ci = {{LabelT|Q1008}}
| Cote d'Ivoire |Côte d'Ivoire |Côte d'Ivoire |civ |ci = {{LabelT|Q1008}}
| Croatia |hrv |hr = {{LabelT|Q224}}
| Croatia |hrv |hr = {{LabelT|Q224}}
| Cuba |cu |cub = {{LabelT|Q241}}
| Cuba |cu |cub = {{LabelT|Q241}}
Line 112: Line 92:
| India |ind |in = {{LabelT|Q668}}
| India |ind |in = {{LabelT|Q668}}
| Indonesia |idn |id = {{LabelT|Q252}}
| Indonesia |idn |id = {{LabelT|Q252}}
| Iran |irn |ir = {{LabelT|Q794}}
| Iran |irn |ir = {{LabelT|Q794}}
| Iraq |irq |iq = {{LabelT|Q796}}
| Iraq |irq |iq = {{LabelT|Q796}}
| Ireland |irl |ie = {{LabelT|Q27}}
| Ireland |irl |ie = {{LabelT|Q27}}

Latest revision as of 00:03, 27 March 2024

Template documentation


{{{1}}}