Jump to content
 







Main menu
   


Navigation  



Main page
Contents
Current events
Random article
About Wikipedia
Contact us
Donate
 




Contribute  



Help
Learn to edit
Community portal
Recent changes
Upload file
 








Search  

































Create account

Log in
 









Create account
 Log in
 




Pages for logged out editors learn more  



Contributions
Talk
 



















Contents

   



(Top)
 


1 Usage  





2 Additional parameters  



2.1  Hatnote  





2.2  Flag variants  





2.3  Redirect aliases  





2.4  Related templates  





2.5  Flag article link  





2.6  Additional documentation  





2.7  Categorization  
















Template:Country showdata






Acèh
Afrikaans
Alemannisch

Anarâškielâ
ि
Ænglisc
العربية
ܐܪܡܝܐ
Արեւմտահայերէն
Arpetan

Asturianu

Aymar aru
تۆرکجه
Basa Bali

Banjar
 / Bân-lâm-gú
Basa Banyumasan

Bikol Central
Български

Bosanski
Brezhoneg
Буряад
Català
Cebuano
Čeština
Chavacano de Zamboanga
Chi-Chewa
Corsu
Cymraeg
Dagbanli
Dansk
الدارجة
ދިވެހިބަސް


Eesti
Ελληνικά
Español
Euskara
فارسی
Fiji Hindi
Føroyskt
Français
Gàidhlig
Galego


/Hak-kâ-ngî

Hausa
Հայերեն
ि
Bahasa Hulontalo
Ilokano
Bahasa Indonesia
IsiXhosa
Íslenska
Jawa

Kapampangan

 / کٲشُر
Қазақша
Ikinyarwanda
Kiswahili
Kurdî
Ladin

Latina
Latviešu
Lietuvių
Li Niha
Livvinkarjala
Lombard
Magyar
Madhurâ
ि
Македонски
Malagasy

Māori


مصرى

Bahasa Melayu
 
Minangkabau
 / Mìng-dĕ̤ng-nḡ
Mirandés
Монгол

Na Vosa Vakaviti

 

Norfuk / Pitkern
Norsk bokmål
Norsk nynorsk
Occitan
ି
Oʻzbekcha / ўзбекча

Pälzisch
پنجابی

پښتو

Tok Pisin
Português
Qaraqalpaqsha
Română
Runa Simi
Саха тыла
Sakizaya
Gagana Samoa

Sängö

Scots

Simple English
سنڌي
Slovenščina
Ślůnski
Soomaaliga
کوردی
Српски / srpski
Srpskohrvatski / српскохрватски
Sunda
Suomi
Svenska
Tagalog
ி
Taqbaylit
Татарча / tatarça
 


Thuɔŋjäŋ

Тоҷикӣ

Türkçe
Türkmençe
Basa Ugi
Українська
اردو
ئۇيغۇرچە / Uyghurche
Tiếng Vit

Winaray

Xitsonga
Yorùbá

Zazaki
Žemaitėška

Batak Toba
Betawi
 
 

Edit links
 









Template
Talk
 

















Read
View source
View history
 








Tools
   


Actions  



Read
View source
View history
 




General  



What links here
Related changes
Upload file
Special pages
Permanent link
Page information
Get shortened URL
Download QR code
Wikidata item
 




Print/export  



Download as PDF
Printable version
 




In other projects  



Wikimedia Commons
Meta-Wiki
Wikimania
Wikiversity
 
















Appearance
   

 





Permanently protected template

From Wikipedia, the free encyclopedia
 


This template is used for documenting country data meta-templates used by the flag template system. The output of this template can be seen by directly viewing any of the templates in Category:Country data templates.

See Wikipedia:WikiProject Flag Template for the main documentation and discussion page for the flag template system.

Usage

This template is automatically invoked by the standard syntax of a country data template:

{{ {{{1<noinclude>|country showdata</noinclude>}}}
| alias = Countryname
| shortname alias = Shortcountryname  <!-- only necessary if Shortcountryname ≠ Countryname, otherwise omit -->
| flag alias = Flag of Countryname.svg
| size = {{{size|}}}
| name = {{{name|}}}
| variant = {{{variant|}}}  <!-- only necessary if there is one or more flag alias-variant parameters, otherwise omit -->
}}

The first parameter to a country data template is usually the name of a formatting meta-template. For example, Template:Flag uses Template:Flag/core to actually render the flag icon and wikilink. If the first parameter is missing, which is the case when a country data template is viewed directly, the template code fragment {{{1<noinclude>|country showdata</noinclude>}}} ensures that this template will be used as the default first parameter. This technique ensures that country data templates are "self-documenting" if they use the standard syntax.

Additional parameters

Many country data templates require additional documentation beyond the standard mandatory alias and flag alias parameters. This template will automatically document standard optional parameters (such as shortname alias) if present, and can document unique optional parameters (such as flag variants) if instructed to. This latter method uses documentation-specific parameters in the country data template to activate the additional output from this template. These documentation parameters are set off from the rest of the parameters in the country data template by a <noinclude> section:

<noinclude>
| var1 = ...
| redir1 = ...
| related1 = ...
</noinclude>

Hatnote

If a brief hatnote is needed, then it can be added to the top of the documentation page by including the |hatnote= parameter with any of the existing hatnote templates. Example:

|hatnote={{Hatnote|This template contains data that applies to the [[Republic of Ireland|sovereign state]]. For the island of [[Ireland]], see [[Template:Country data Ireland]].}}

results in:

See also {{Country data Georgia}} for another hatnote example.

Flag variants

Flag variants are added to a country data template by the inclusion of one or more flag alias-label parameters, where each label is a unique identifier that is subsequently used as an input parameter to {{flag|...}}, {{flagicon|...}}, etc. To document these flag variants, use the varN documentation parameters to identify each label.

For example, Template:Country data Seychelles identifies three flag variants (in addition to the current flag) with the following code:

| flag alias-1976 = Flag of the Seychelles 1976.svg
| flag alias-1977 = Flag of the Seychelles 1977.svg
| flag alias-colonial = Government Ensign of the United Kingdom.svg

These three variants are documented by the following code segment later in the template:

<noinclude>
| var1 = 1976
| var2 = 1977
| var3 = colonial
...
</noinclude>

Up to forty flag variants can be documented by this method (using var1tovar40). If more are present, these can be listed on a separate documentation subpage as described below.

Note that you do not have to use a varN parameter for the standard optional variant labels naval, air force and army (used for the country's naval, air force and army ensigns, respectively). If present, they will automatically be documented.

Redirect aliases

Many country data templates have alias names that can be used instead of the usual country name with all of the main flag templates. These are usually, but not exclusively, standard country code abbreviations such as those specified in ISO 3166-1 alpha-3 or by the IOCorFIFA. These are implemented as redirects, and are listed in Category:Country data redirects.

For example, Template:Country data DEU and Template:Country data GER both redirect to Template:Country data Germany, because DEU is the ISO code and GER is the IOC and FIFA code for Germany. Therefore, {{flagicon|DEU}}, {{flagicon|GER}}, and {{flagicon|Germany}} all have the same result. These redirect aliases are documented by the following template code fragment:

<noinclude>
...
| redir1 = DEU
| redir2 = GER
...
</noinclude>

Up to five flag redirects can be documented by this method (using redir1toredir5).

Related templates

Several country data templates are used for alternative forms to the common country data template for the nation, usually but not exclusively for historic nations. Pointers to these alternative templates are useful additions to the template documentation so that editors can use the correct template for their specific purposes.

For example, Template:Country data Serbia and Montenegro includes the following code to document three other related country data templates:

<noinclude>
...
| related1 = Serbia
| related2 = Montenegro
| related3 = FR Yugoslavia
...
</noinclude>

Up to six related flags can be documented by this method (using related1torelated6).

Flag article link

This template shows a large flag image on the right of the documentation box, with a link to an article about the flag in the caption if it exists. The page that it evaluates is "Flag of {{{alias}}}", with the value of |alias= in the template code replacing {{{alias}}}. If there is an article about the flag even though "Flag of {{{alias}}}" does not exist, either create the latter as a redirect to the correct page or add the following parameter:

<noinclude>
...
| flag link = ''Article name''
...
</noinclude>

This can also be used to override the automatic link if "Flag of {{{alias}}}" does exist but leads to the wrong article.

Additional documentation

For situations where the automatic documentation method is not completely adequate, additional documentation can be displayed by country showdata. Simply create a documentation subpage (named as Template:Country data Countryname/doc) with the additional material, and it will be transcluded to a section called "Other information" at or near the end of the automatic documentation. This "extra" documentation page can usually be edited even if the country data template is edit-protected.

For example:

Categorization

This template automatically categorizes pages it is transcluded on in Category:All country data templates and in the tracking categories in Category:Country data tracking categories. Content categories, such as those by countryorby type/status, should be added manually by putting them inside <includeonly>...</includeonly> tags on a template's documentation subpage. If a template does not have a documentation page yet, click on the "/doc" link at the bottom of the automatic documentation, add categories between the preloaded <includeonly> tags and save the page.

The default sort key used for the automatic categories is the part after Template:Country data in the page title. The parameter |cat= can be used to specify a custom ASCII sorting key for these categories. For example, Template:Country data Åland Islands and Template:Country data Republic of Ireland use this parameter to sort them under "A" and "I" respectively.

Automatically added by this template:

Manually added to templates or documentation pages:


Retrieved from "https://en.wikipedia.org/w/index.php?title=Template:Country_showdata&oldid=1123403643"

Categories: 
Templates based on the String Lua module
Flag template system
Data retrieval templates
Hidden category: 
Wikipedia template-protected templates
 



This page was last edited on 23 November 2022, at 15:13 (UTC).

Text is available under the Creative Commons Attribution-ShareAlike License 4.0; additional terms may apply. By using this site, you agree to the Terms of Use and Privacy Policy. Wikipedia® is a registered trademark of the Wikimedia Foundation, Inc., a non-profit organization.



Privacy policy

About Wikipedia

Disclaimers

Contact Wikipedia

Code of Conduct

Developers

Statistics

Cookie statement

Mobile view



Wikimedia Foundation
Powered by MediaWiki