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
remove North Macedonian example, since New Zealand one shows same functionality with a different script (= slightly more interesting)
Fix language-code links to use Wikipedia interwiki prefixes
 
(2 intermediate revisions by 2 users not shown)
Line 1: Line 1:
{{TemplateBox
{{TemplateBox
|1=1
|1=1
|1d=ISO code for country (e.g., EE = Estonia — for a 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
Line 16: Line 16:


|name=Country
|name=Country
|desc=Given the [[:en:ISO 3166-1 alpha-2|ISO code]] for a country, it checks if the English language name of the country matches a template name (e.g., EE → {{tl|Estonia}}). If such a template exists, it calls that template; if not, it returns the English name. The individual country templates provide localization of country names, and link the localized name to the Wikipedia entry in the relevant language (e.g., {{tl|Estonia}} produces: {{Estonia}}).
|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 33: Line 33:


== Examples ==
== Examples ==
* “Estonia” in user's [[m:Help:Preferences#Internationalisation|selected language]]: {{tlc|Country|EE}} → {{Country|EE}}
 
* “Estonia” in Estonian: {{tlc|Country|EE|3=lang=et}} → {{Country|EE|lang=et}}
 
* “Estonia” in German: {{tlc|Country|EE|3=lang=de}} → {{Country|EE|lang=de}}
 
* "New Zealand" in Russian: {{tlc|Country|NZ|3=lang=ru}} → {{Country|NZ|lang=ru}}
* "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}}
* "Ukraine" in Ukrainian with no wikilink: {{tlc|Country|UA|3=lang=uk|4=nolink=1}} → {{Country|UA|lang=uk|nolink=1}}
Cookies help us deliver our services. By using our services, you agree to our use of cookies.