Jump to content
Toggle menu
  • 8 articles
  • 75 files
  • 7 users
  • 37.8K edits
Neodyland Wiki
Toggle preferences menu
Toggle personal menu
Not logged in
Your IP address will be publicly visible if you make any edits.

Template:Country/doc: Difference between revisions

Template page
explaining ISO code
Fix language-code links to use Wikipedia interwiki prefixes
 
(10 intermediate revisions by 5 users not shown)
Line 1: Line 1:
{{TemplateBox
{{TemplateBox
|1=1
|1=1
|1d=ISO code for country, eg EE=Estonia (for list see [[:en:ISO 3166-1 alpha-2]])
|1d=ISO code for country (e.g., EE = Estonia for a list see [[w:ISO 3166-1 alpha-2]])
|1def=
|1def=
|1stat=required
|1stat=required


|2=lang
|2=lang
|2d=language code
|2d=language code (must be entirely lowercase)
|2def=
|2def=
|2stat=optional-
|2stat=optional-
Line 16: Line 16:


|name=Country
|name=Country
|desc=Given the [[:en:ISO 3166-1 alpha-2|ISO code]], it checks if the English language name of the country matches a template name (eg EE -> {{tl|Estonia}}). If it exists, it outputs that template, if not, just the name. The country templates provide localization of country names, and link the localized name to the relevant Wikipedia entry in the relevant language. eg {{tl|Estonia}} produces <code>{{Estonia}}</code>.
|desc=Given the [[w:ISO 3166-1 alpha-2|ISO code]] for a country, it checks if the English language name of the country matches a template name. If such a template exists, it calls that template; if not, it returns the English name.
|namespace=all
|namespace=all
|usergroup=all
|usergroup=all
Line 25: Line 25:
|i18n-method=-
|i18n-method=-
|i18n-desc=
|i18n-desc=
|seealso={{tl|CountryName}} - which provides just the country name, without linking anywhere
|seealso={{tl|CountryName}}, which provides just the country name without linking it
|setscats=
|setscats=
|lines=
|lines=
Line 33: Line 33:


== Examples ==
== Examples ==
*"Estonia" in current language: {{tlx|Country|EE}} gives "{{Country|EE}}"
 
*"Italy" in Polish: {{tlx|Country|IT|lang=PL}} gives "{{Country|IT|lang=PL}}"
 
*"Ukraine" in Ukrainian without link: {{tlx|Country|UA|3=lang=UK|4=nolink=1}} gives "{{Country|UA|lang=UK|nolink=1}}"
 
* "New Zealand" in Russian: {{tlc|Country|NZ|3=lang=ru}} {{Country|NZ|lang=ru}}
* "Ukraine" in Ukrainian with no wikilink: {{tlc|Country|UA|3=lang=uk|4=nolink=1}} {{Country|UA|lang=uk|nolink=1}}

Latest revision as of 18:44, 12 August 2026

Given the ISO code for a country, it checks if the English language name of the country matches a template name. If such a template exists, it calls that template; if not, it returns the English name.

Usage

{{Country |1= }}

Template parameters

ParameterDescriptionDefaultStatus
1ISO code for country (e.g., EE = Estonia — for a list see w:ISO 3166-1 alpha-2)emptyrequired
langlanguage code (must be entirely lowercase)emptyoptional
nolinkset to suppress hyperlinkemptyoptional

Additional information

The template is intended to be used in the following namespaces: all namespaces

The template is intended to be used by the following user groups: all users

See also

{{CountryName}}, which provides just the country name without linking it

Localization

This template is not intended to be localized.

Examples

  • "New Zealand" in Russian: {{Country|NZ|lang=ru}} → New Zealand
  • "Ukraine" in Ukrainian with no wikilink: {{Country|UA|lang=uk|nolink=1}} → Ukraine
Cookies help us deliver our services. By using our services, you agree to our use of cookies.