Template:Country showdata: Difference between revisions
[[Templates]]>S.A. Julio m (fix grammar) |
No edit summary |
||
(3 intermediate revisions by 2 users not shown) | |||
Line 1: | Line 1: | ||
<includeonly>__NOEDITSECTION__ | <includeonly>__NOEDITSECTION__ | ||
{{documentation|content=<code>Template:{{PAGENAME}}</code> is an internal data container not intended to be transcluded directly. It is used indirectly by templates such as <code>[[Template:flag|flag]]</code>, <code>[[Template:flagicon|flagicon]]</code>, and others. | {{documentation|content= | ||
{{#if:{{{hatnote|}}}|{{{hatnote}}}}} | |||
{{#ifeq:{{#invoke:High-use|num|x|demo={{ROOTPAGENAME}}}}|many||{{High-use|demo={{ROOTPAGENAME}}}}}} | |||
{{notice|image=Exclamationdiamond.svg|<code>Template:{{{demopagename|{{PAGENAME}}}}}</code> is an internal data container not intended to be transcluded directly. It is used indirectly by templates such as <code>[[Template:flag|flag]]</code>, <code>[[Template:flagicon|flagicon]]</code>, and others.}} | |||
{{ombox|text=This template is within the scope of '''[[Wikipedia:WikiProject Flag Template|WikiProject Flag Template]]''', a collaborative effort to maintain flag templates on Wikipedia. A more thorough discussion of the flag template system, including parameters not described here, can be found on the project page.}} | {{ombox|text=This template is within the scope of '''[[Wikipedia:WikiProject Flag Template|WikiProject Flag Template]]''', a collaborative effort to maintain flag templates on Wikipedia. A more thorough discussion of the flag template system, including parameters not described here, can be found on the project page.}} | ||
[[File:{{{flag alias|Flag of None.svg}}}|thumb|{{#if:{{{flag link|}}} | See also: [[{{{flag link}}}]] | {{#ifexist: Flag of {{{alias}}} | See also: [[Flag of {{{alias}}}]] | }} }}]] | [[File:{{{flag alias|Flag of None.svg}}}|thumb|{{#if:{{{flag link|}}} | See also: [[{{{flag link}}}]] | {{#ifexist: Flag of {{{alias}}} | See also: [[Flag of {{{alias}}}]] | }} }}]] | ||
===Standard parameters=== | ===Standard parameters=== | ||
<table class="wikitable"> | <table class="wikitable"> | ||
Line 26: | Line 30: | ||
</tr></table> | </tr></table> | ||
{{#if: {{{var1|{{{flag alias-naval|{{{flag alias-marines|{{{flag alias-military|{{{flag alias-coast guard|{{{flag alias-navy|{{{flag alias-air force|{{{flag alias-space force|{{{flag alias-army|}}}}}}}}}}}}}}}}}}}}}}}}}}} | | {{#if: {{{var1|{{{flag alias-naval|{{{flag alias-marines|{{{flag alias-military|{{{flag alias-coast guard|{{{flag alias-navy|{{{flag alias-air force|{{{flag alias-space force|{{{flag alias-army|}}}}}}}}}}}}}}}}}}}}}}}}}}} | | ||
===Flag variants=== | ===Flag variants=== | ||
{{#if:{{{flag link|}}} | {{details|{{{flag link}}}}} | {{#ifexist: Flag of {{{alias}}} | {{details|Flag of {{{alias}}}}} | }} }} | {{#if:{{{flag link|}}} | {{details|{{{flag link}}}}} | {{#ifexist: Flag of {{{alias}}} | {{details|Flag of {{{alias}}}}} | }} }} | ||
Line 80: | Line 85: | ||
-->{{#if: {{{flag alias-army|}}} | <tr><td><code>army</code></td><td style="text-align:center;">[[File:{{{flag alias-army}}}|40px|{{{border-army|{{{border|border}}}}}}]]</td><td><code>{{{flag alias-army}}}</code></td></tr> }}<!-- | -->{{#if: {{{flag alias-army|}}} | <tr><td><code>army</code></td><td style="text-align:center;">[[File:{{{flag alias-army}}}|40px|{{{border-army|{{{border|border}}}}}}]]</td><td><code>{{{flag alias-army}}}</code></td></tr> }}<!-- | ||
--></table> | --></table> | ||
}} | |||
{{#if: {{{redir1|}}} | | |||
===Redirect aliases=== | |||
This template can also be used via an ''alias'' name (implemented as a redirect to this template):<!-- | |||
--><table class="wikitable"><!-- | |||
--><tr><th>Alias name</th><th>{{tlx|flag|''alias''}} output</th><th>{{tlx|flagcountry|''alias''}} output</th></tr> | |||
{{#if: {{{redir1|}}} | <tr><td><code>{{{redir1}}}</code> (<span class="plainlinks">[{{fullurl:Template:Country data {{{redir1}}}|redirect=no}} view]</span>)</td><td>{{flag|{{{redir1}}}}}</td><td>{{flagcountry|{{{redir1}}}}}</td></tr> }}<!-- | |||
-->{{#if: {{{redir2|}}} | <tr><td><code>{{{redir2}}}</code> (<span class="plainlinks">[{{fullurl:Template:Country data {{{redir2}}}|redirect=no}} view]</span>)</td><td>{{flag|{{{redir2}}}}}</td><td>{{flagcountry|{{{redir2}}}}}</td></tr> }}<!-- | |||
-->{{#if: {{{redir3|}}} | <tr><td><code>{{{redir3}}}</code> (<span class="plainlinks">[{{fullurl:Template:Country data {{{redir3}}}|redirect=no}} view]</span>)</td><td>{{flag|{{{redir3}}}}}</td><td>{{flagcountry|{{{redir3}}}}}</td></tr> }}<!-- | |||
-->{{#if: {{{redir4|}}} | <tr><td><code>{{{redir4}}}</code> (<span class="plainlinks">[{{fullurl:Template:Country data {{{redir4}}}|redirect=no}} view]</span>)</td><td>{{flag|{{{redir4}}}}}</td><td>{{flagcountry|{{{redir4}}}}}</td></tr> }}<!-- | |||
-->{{#if: {{{redir5|}}} | <tr><td><code>{{{redir5}}}</code> (<span class="plainlinks">[{{fullurl:Template:Country data {{{redir5}}}|redirect=no}} view]</span>)</td><td>{{flag|{{{redir5}}}}}</td><td>{{flagcountry|{{{redir5}}}}}</td></tr> }}<!-- | |||
--></table> | |||
See [{{fullurl:Special:WhatLinksHere/{{FULLPAGENAMEE}}|hidelinks=1&hidetrans=1}} What links here] for a full list of redirects. | |||
}} | |||
===Example usage=== | |||
* <code><nowiki>{{flag|</nowiki>{{#invoke:String|replace|{{{demopagename|{{PAGENAME}}}}}|^%w+ data |||false}}<nowiki>}}</nowiki></code> → {{flag|{{#invoke:String|replace|{{{demopagename|{{PAGENAME}}}}}|^%w+ data |||false}}}} | |||
* <code><nowiki>{{flagicon|</nowiki>{{#invoke:String|replace|{{{demopagename|{{PAGENAME}}}}}|^%w+ data |||false}}<nowiki>}}</nowiki></code> → {{flagicon|{{#invoke:String|replace|{{{demopagename|{{PAGENAME}}}}}|^%w+ data |||false}}}}<!-- | |||
-->{{#if: {{{shortname alias|}}} | | |||
* <code><nowiki>{{flagcountry|</nowiki>{{#invoke:String|replace|{{{demopagename|{{PAGENAME}}}}}|^%w+ data |||false}}<nowiki>}}</nowiki></code> → {{flagcountry|{{#invoke:String|replace|{{{demopagename|{{PAGENAME}}}}}|^%w+ data |||false}}}} }} | |||
{{#if: {{{var1|}}} | | |||
====Using a flag variant==== | |||
* <code><nowiki>{{flag|</nowiki>{{#invoke:String|replace|{{{demopagename|{{PAGENAME}}}}}|^%w+ data |||false}}<nowiki>|</nowiki>{{{var1}}}<nowiki>}}</nowiki></code> → {{flag|{{#invoke:String|replace|{{{demopagename|{{PAGENAME}}}}}|^%w+ data |||false}}|{{{var1}}}}} | |||
* <code><nowiki>{{flagicon|</nowiki>{{#invoke:String|replace|{{{demopagename|{{PAGENAME}}}}}|^%w+ data |||false}}<nowiki>|</nowiki>{{{var1}}}<nowiki>}}</nowiki></code> → {{flagicon|{{#invoke:String|replace|{{{demopagename|{{PAGENAME}}}}}|^%w+ data |||false}}|{{{var1}}}}} | |||
}} | |||
{{#if: {{{redir1|}}} | | |||
====Using a redirect alias==== | |||
* <code><nowiki>{{flagicon|</nowiki>{{{redir1}}}<nowiki>}}</nowiki></code> → {{flagicon|{{{redir1}}}}} | |||
* <code><nowiki>{{flagcountry|</nowiki>{{{redir1}}}<nowiki>}}</nowiki></code> → {{flagcountry|{{{redir1}}}}} | |||
* <code><nowiki>{{flag|</nowiki>{{{redir1}}}<nowiki>}}</nowiki></code> → {{flag|{{{redir1}}}}} | |||
}} | }} | ||
{{#if: {{{flag alias-naval|}}}{{{link alias-naval|}}}{{{flag alias-air force|}}}{{{link alias-air force|}}}{{{flag alias-space force|}}}{{{link alias-space force|}}}{{{flag alias-army|}}}{{{link alias-army|}}}{{{flag alias-coast guard|}}}{{{link alias-coast guard|}}}{{{flag alias-military|}}}{{{link alias-military|}}}{{{flag alias-marines|}}}{{{link alias-marines|}}} | | {{#if: {{{flag alias-naval|}}}{{{link alias-naval|}}}{{{flag alias-air force|}}}{{{link alias-air force|}}}{{{flag alias-space force|}}}{{{link alias-space force|}}}{{{flag alias-army|}}}{{{link alias-army|}}}{{{flag alias-coast guard|}}}{{{link alias-coast guard|}}}{{{flag alias-military|}}}{{{link alias-military|}}}{{{flag alias-marines|}}}{{{link alias-marines|}}} | | ||
===Military ensigns=== | ===Military ensigns=== | ||
{{#if: {{{flag alias-naval|}}} | | {{#if: {{{flag alias-naval|}}} | | ||
This template includes a naval | This template includes a naval flag variant that can be used with [[Template:Naval]]: | ||
* <code><nowiki>{{ | * <code><nowiki>{{naval|</nowiki>{{#invoke:String|replace|{{{demopagename|{{PAGENAME}}}}}|^%w+ data |||false}}<nowiki>}}</nowiki></code> → {{naval|{{#invoke:String|replace|{{{demopagename|{{PAGENAME}}}}}|^%w+ data |||false}}|naval}} | ||
* <code><nowiki>{{flagicon|</nowiki>{{#invoke:String|replace|{{PAGENAME}}|^%w+ data |||false}}<nowiki>|naval}}</nowiki></code> → {{flagicon|{{#invoke:String|replace|{{PAGENAME}}|^%w+ data |||false}}|naval}} | * <code><nowiki>{{flagicon|</nowiki>{{#invoke:String|replace|{{{demopagename|{{PAGENAME}}}}}|^%w+ data |||false}}<nowiki>|naval}}</nowiki></code> → {{flagicon|{{#invoke:String|replace|{{{demopagename|{{PAGENAME}}}}}|^%w+ data |||false}}|naval}} | ||
| {{#if: {{{link alias-naval|}}} | | | {{#if: {{{link alias-naval|}}} | | ||
This nation's naval | This nation's naval flag is the same as its national flag, so [[Template:Naval]] produces the following: | ||
* <code><nowiki>{{ | * <code><nowiki>{{naval|</nowiki>{{#invoke:String|replace|{{{demopagename|{{PAGENAME}}}}}|^%w+ data |||false}}<nowiki>}}</nowiki></code> → {{naval|{{#invoke:String|replace|{{{demopagename|{{PAGENAME}}}}}|^%w+ data |||false}}}} | ||
}}}}<!-- | }}}}<!-- | ||
-->{{#if: {{{flag alias-air force|}}} |{{break}} | -->{{#if: {{{flag alias-air force|}}} |{{break}} | ||
This template includes an air force ensign flag variant that can be used with [[Template:Air force]]: | This template includes an air force ensign flag variant that can be used with [[Template:Air force]]: | ||
* <code><nowiki>{{air force|</nowiki>{{#invoke:String|replace|{{PAGENAME}}|^%w+ data |||false}}<nowiki>}}</nowiki></code> → {{air force|{{#invoke:String|replace|{{PAGENAME}}|^%w+ data |||false}}}} | * <code><nowiki>{{air force|</nowiki>{{#invoke:String|replace|{{{demopagename|{{PAGENAME}}}}}|^%w+ data |||false}}<nowiki>}}</nowiki></code> → {{air force|{{#invoke:String|replace|{{{demopagename|{{PAGENAME}}}}}|^%w+ data |||false}}}} | ||
* <code><nowiki>{{flagicon|</nowiki>{{#invoke:String|replace|{{PAGENAME}}|^%w+ data |||false}}<nowiki>|air force}}</nowiki></code> → {{flagicon|{{#invoke:String|replace|{{PAGENAME}}|^%w+ data |||false}}|air force}} | * <code><nowiki>{{flagicon|</nowiki>{{#invoke:String|replace|{{{demopagename|{{PAGENAME}}}}}|^%w+ data |||false}}<nowiki>|air force}}</nowiki></code> → {{flagicon|{{#invoke:String|replace|{{{demopagename|{{PAGENAME}}}}}|^%w+ data |||false}}|air force}} | ||
| {{#if: {{{link alias-air force|}}} |{{break}} | | {{#if: {{{link alias-air force|}}} |{{break}} | ||
This nation's air force ensign is the same as its national flag, so [[Template:Air force]] produces the following: | This nation's air force ensign is the same as its national flag, so [[Template:Air force]] produces the following: | ||
* <code><nowiki>{{air force|</nowiki>{{#invoke:String|replace|{{PAGENAME}}|^%w+ data |||false}}<nowiki>}}</nowiki></code> → {{air force|{{#invoke:String|replace|{{PAGENAME}}|^%w+ data |||false}}}} | * <code><nowiki>{{air force|</nowiki>{{#invoke:String|replace|{{{demopagename|{{PAGENAME}}}}}|^%w+ data |||false}}<nowiki>}}</nowiki></code> → {{air force|{{#invoke:String|replace|{{{demopagename|{{PAGENAME}}}}}|^%w+ data |||false}}}} | ||
}}}}<!-- | }}}}<!-- | ||
-->{{#if: {{{flag alias-space force|}}} |{{break}} | -->{{#if: {{{flag alias-space force|}}} |{{break}} | ||
This template includes a space force ensign flag variant that can be used with [[Template:Space force]]: | This template includes a space force ensign flag variant that can be used with [[Template:Space force]]: | ||
* <code><nowiki>{{space force|</nowiki>{{#invoke:String|replace|{{PAGENAME}}|^%w+ data |||false}}<nowiki>}}</nowiki></code> → {{space force|{{#invoke:String|replace|{{PAGENAME}}|^%w+ data |||false}}}} | * <code><nowiki>{{space force|</nowiki>{{#invoke:String|replace|{{{demopagename|{{PAGENAME}}}}}|^%w+ data |||false}}<nowiki>}}</nowiki></code> → {{space force|{{#invoke:String|replace|{{{demopagename|{{PAGENAME}}}}}|^%w+ data |||false}}}} | ||
* <code><nowiki>{{flagicon|</nowiki>{{#invoke:String|replace|{{PAGENAME}}|^%w+ data |||false}}<nowiki>|space force}}</nowiki></code> → {{flagicon|{{#invoke:String|replace|{{PAGENAME}}|^%w+ data |||false}}|space force}} | * <code><nowiki>{{flagicon|</nowiki>{{#invoke:String|replace|{{{demopagename|{{PAGENAME}}}}}|^%w+ data |||false}}<nowiki>|space force}}</nowiki></code> → {{flagicon|{{#invoke:String|replace|{{{demopagename|{{PAGENAME}}}}}|^%w+ data |||false}}|space force}} | ||
| {{#if: {{{link alias-space force|}}} |{{break}} | | {{#if: {{{link alias-space force|}}} |{{break}} | ||
This nation's space force flag is the same as its national flag, so [[Template:Space force]] produces the following: | This nation's space force flag is the same as its national flag, so [[Template:Space force]] produces the following: | ||
* <code><nowiki>{{space force|</nowiki>{{#invoke:String|replace|{{PAGENAME}}|^%w+ data |||false}}<nowiki>}}</nowiki></code> → {{space force|{{#invoke:String|replace|{{PAGENAME}}|^%w+ data |||false}}}} | * <code><nowiki>{{space force|</nowiki>{{#invoke:String|replace|{{{demopagename|{{PAGENAME}}}}}|^%w+ data |||false}}<nowiki>}}</nowiki></code> → {{space force|{{#invoke:String|replace|{{{demopagename|{{PAGENAME}}}}}|^%w+ data |||false}}}} | ||
}}}}<!-- | }}}}<!-- | ||
-->{{#if: {{{flag alias-marines|}}} |{{break}} | -->{{#if: {{{flag alias-marines|}}} |{{break}} | ||
This template includes a marine ensign flag variant that can be used with [[Template:Marines]]: | This template includes a marine ensign flag variant that can be used with [[Template:Marines]]: | ||
* <code><nowiki>{{marines|</nowiki>{{#invoke:String|replace|{{PAGENAME}}|^%w+ data |||false}}<nowiki>}}</nowiki></code> → {{marines|{{#invoke:String|replace|{{PAGENAME}}|^%w+ data |||false}}}} | * <code><nowiki>{{marines|</nowiki>{{#invoke:String|replace|{{{demopagename|{{PAGENAME}}}}}|^%w+ data |||false}}<nowiki>}}</nowiki></code> → {{marines|{{#invoke:String|replace|{{{demopagename|{{PAGENAME}}}}}|^%w+ data |||false}}}} | ||
* <code><nowiki>{{flagicon|</nowiki>{{#invoke:String|replace|{{PAGENAME}}|^%w+ data |||false}}<nowiki>|marines}}</nowiki></code> → {{flagicon|{{#invoke:String|replace|{{PAGENAME}}|^%w+ data |||false}}|marines}} | * <code><nowiki>{{flagicon|</nowiki>{{#invoke:String|replace|{{{demopagename|{{PAGENAME}}}}}|^%w+ data |||false}}<nowiki>|marines}}</nowiki></code> → {{flagicon|{{#invoke:String|replace|{{{demopagename|{{PAGENAME}}}}}|^%w+ data |||false}}|marines}} | ||
| {{#if: {{{link alias-marines|}}} |{{break}} | | {{#if: {{{link alias-marines|}}} |{{break}} | ||
This nation's marine ensign is the same as its national flag, so [[Template:Marines]] produces the following: | This nation's marine ensign is the same as its national flag, so [[Template:Marines]] produces the following: | ||
* <code><nowiki>{{marines|</nowiki>{{#invoke:String|replace|{{PAGENAME}}|^%w+ data |||false}}<nowiki>}}</nowiki></code> → {{marines|{{#invoke:String|replace|{{PAGENAME}}|^%w+ data |||false}}}} | * <code><nowiki>{{marines|</nowiki>{{#invoke:String|replace|{{{demopagename|{{PAGENAME}}}}}|^%w+ data |||false}}<nowiki>}}</nowiki></code> → {{marines|{{#invoke:String|replace|{{{demopagename|{{PAGENAME}}}}}|^%w+ data |||false}}}} | ||
}}}}<!-- | }}}}<!-- | ||
-->{{#if: {{{flag alias-military|}}} |{{break}} | -->{{#if: {{{flag alias-military|}}} |{{break}} | ||
This template includes a marine ensign flag variant that can be used with [[Template:Armed forces]]: | This template includes a marine ensign flag variant that can be used with [[Template:Armed forces]]: | ||
* <code><nowiki>{{Armed forces|</nowiki>{{#invoke:String|replace|{{PAGENAME}}|^%w+ data |||false}}<nowiki>}}</nowiki></code> → {{Armed forces|{{#invoke:String|replace|{{PAGENAME}}|^%w+ data |||false}}}} | * <code><nowiki>{{Armed forces|</nowiki>{{#invoke:String|replace|{{{demopagename|{{PAGENAME}}}}}|^%w+ data |||false}}<nowiki>}}</nowiki></code> → {{Armed forces|{{#invoke:String|replace|{{{demopagename|{{PAGENAME}}}}}|^%w+ data |||false}}}} | ||
* <code><nowiki>{{flagicon|</nowiki>{{#invoke:String|replace|{{PAGENAME}}|^%w+ data |||false}}<nowiki>|military}}</nowiki></code> → {{flagicon|{{#invoke:String|replace|{{PAGENAME}}|^%w+ data |||false}}|military}} | * <code><nowiki>{{flagicon|</nowiki>{{#invoke:String|replace|{{{demopagename|{{PAGENAME}}}}}|^%w+ data |||false}}<nowiki>|military}}</nowiki></code> → {{flagicon|{{#invoke:String|replace|{{{demopagename|{{PAGENAME}}}}}|^%w+ data |||false}}|military}} | ||
| {{#if: {{{link alias-military|}}} |{{break}} | | {{#if: {{{link alias-military|}}} |{{break}} | ||
This nation's military ensign is the same as its national flag, so [[Template: Armed forces]] produces the following: | This nation's military ensign is the same as its national flag, so [[Template: Armed forces]] produces the following: | ||
* <code><nowiki>{{Armed forces|</nowiki>{{#invoke:String|replace|{{PAGENAME}}|^%w+ data |||false}}<nowiki>}}</nowiki></code> → {{Armed forces|{{#invoke:String|replace|{{PAGENAME}}|^%w+ data |||false}}}} | * <code><nowiki>{{Armed forces|</nowiki>{{#invoke:String|replace|{{{demopagename|{{PAGENAME}}}}}|^%w+ data |||false}}<nowiki>}}</nowiki></code> → {{Armed forces|{{#invoke:String|replace|{{{demopagename|{{PAGENAME}}}}}|^%w+ data |||false}}}} | ||
}}}}<!-- | }}}}<!-- | ||
-->{{#if: {{{flag alias-navy|}}} |{{break}} | -->{{#if: {{{flag alias-navy|}}} |{{break}} | ||
This template includes | This template includes an ensign flag variant that can be used with [[Template:Navy]]: | ||
* <code><nowiki>{{ | * <code><nowiki>{{navy|</nowiki>{{#invoke:String|replace|{{{demopagename|{{PAGENAME}}}}}|^%w+ data |||false}}<nowiki>}}</nowiki></code> → {{navy|{{#invoke:String|replace|{{{demopagename|{{PAGENAME}}}}}|^%w+ data |||false}}|navy}} | ||
* <code><nowiki>{{flagicon|</nowiki>{{#invoke:String|replace|{{PAGENAME}}|^%w+ data |||false}}<nowiki>|navy}}</nowiki></code> → {{flagicon|{{#invoke:String|replace|{{PAGENAME}}|^%w+ data |||false}}|navy}} | * <code><nowiki>{{flagicon|</nowiki>{{#invoke:String|replace|{{{demopagename|{{PAGENAME}}}}}|^%w+ data |||false}}<nowiki>|navy}}</nowiki></code> → {{flagicon|{{#invoke:String|replace|{{{demopagename|{{PAGENAME}}}}}|^%w+ data |||false}}|navy}} | ||
| {{#if: {{{link alias-navy|}}} |{{break}} | | {{#if: {{{link alias-navy|}}} |{{break}} | ||
This nation's navy flag is the same as its national flag, so [[Template: | This nation's navy flag is the same as its national flag, so [[Template:Navy]] produces the following: | ||
* <code><nowiki>{{ | * <code><nowiki>{{navy|</nowiki>{{#invoke:String|replace|{{{demopagename|{{PAGENAME}}}}}|^%w+ data |||false}}<nowiki>}}</nowiki></code> → {{navy|{{#invoke:String|replace|{{{demopagename|{{PAGENAME}}}}}|^%w+ data |||false}}}} | ||
}}}}<!-- | }}}}<!-- | ||
-->{{#if: {{{flag alias-coast guard|}}} |{{break}} | -->{{#if: {{{flag alias-coast guard|}}} |{{break}} | ||
This template includes a coast guard ensign flag variant that can be used with [[Template:Coast guard]]: | This template includes a coast guard ensign flag variant that can be used with [[Template:Coast guard]]: | ||
* <code><nowiki>{{coast guard|</nowiki>{{#invoke:String|replace|{{PAGENAME}}|^%w+ data |||false}}<nowiki>}}</nowiki></code> → {{coast guard|{{#invoke:String|replace|{{PAGENAME}}|^%w+ data |||false}}}} | * <code><nowiki>{{coast guard|</nowiki>{{#invoke:String|replace|{{{demopagename|{{PAGENAME}}}}}|^%w+ data |||false}}<nowiki>}}</nowiki></code> → {{coast guard|{{#invoke:String|replace|{{{demopagename|{{PAGENAME}}}}}|^%w+ data |||false}}}} | ||
* <code><nowiki>{{flagicon|</nowiki>{{#invoke:String|replace|{{PAGENAME}}|^%w+ data |||false}}<nowiki>|coast guard}}</nowiki></code> → {{flagicon|{{#invoke:String|replace|{{PAGENAME}}|^%w+ data |||false}}|coast guard}} | * <code><nowiki>{{flagicon|</nowiki>{{#invoke:String|replace|{{{demopagename|{{PAGENAME}}}}}|^%w+ data |||false}}<nowiki>|coast guard}}</nowiki></code> → {{flagicon|{{#invoke:String|replace|{{{demopagename|{{PAGENAME}}}}}|^%w+ data |||false}}|coast guard}} | ||
| {{#if: {{{link alias-coast guard|}}} |{{break}} | | {{#if: {{{link alias-coast guard|}}} |{{break}} | ||
This nation's coast guard ensign is the same as its national flag, so [[Template:Coast guard]] produces the following: | This nation's coast guard ensign is the same as its national flag, so [[Template:Coast guard]] produces the following: | ||
* <code><nowiki>{{coast guard|</nowiki>{{#invoke:String|replace|{{PAGENAME}}|^%w+ data |||false}}<nowiki>}}</nowiki></code> → {{coast guard|{{#invoke:String|replace|{{PAGENAME}}|^%w+ data |||false}}}} | * <code><nowiki>{{coast guard|</nowiki>{{#invoke:String|replace|{{{demopagename|{{PAGENAME}}}}}|^%w+ data |||false}}<nowiki>}}</nowiki></code> → {{coast guard|{{#invoke:String|replace|{{{demopagename|{{PAGENAME}}}}}|^%w+ data |||false}}}} | ||
}}}}<!-- | }}}}<!-- | ||
-->{{#if: {{{flag alias-army|}}} |{{break}} | -->{{#if: {{{flag alias-army|}}} |{{break}} | ||
This template includes an army ensign flag variant that can be used with [[Template:Army]]: | This template includes an army ensign flag variant that can be used with [[Template:Army]]: | ||
* <code><nowiki>{{army|</nowiki>{{#invoke:String|replace|{{PAGENAME}}|^%w+ data |||false}}<nowiki>}}</nowiki></code> → {{army|{{#invoke:String|replace|{{PAGENAME}}|^%w+ data |||false}}}} | * <code><nowiki>{{army|</nowiki>{{#invoke:String|replace|{{{demopagename|{{PAGENAME}}}}}|^%w+ data |||false}}<nowiki>}}</nowiki></code> → {{army|{{#invoke:String|replace|{{{demopagename|{{PAGENAME}}}}}|^%w+ data |||false}}}} | ||
* <code><nowiki>{{flagicon|</nowiki>{{#invoke:String|replace|{{PAGENAME}}|^%w+ data |||false}}<nowiki>|army}}</nowiki></code> → {{flagicon|{{#invoke:String|replace|{{PAGENAME}}|^%w+ data |||false}}|army}} | * <code><nowiki>{{flagicon|</nowiki>{{#invoke:String|replace|{{{demopagename|{{PAGENAME}}}}}|^%w+ data |||false}}<nowiki>|army}}</nowiki></code> → {{flagicon|{{#invoke:String|replace|{{{demopagename|{{PAGENAME}}}}}|^%w+ data |||false}}|army}} | ||
| {{#if: {{{link alias-army|}}} |{{break}} | | {{#if: {{{link alias-army|}}} |{{break}} | ||
This nation's army ensign is the same as its national flag, so [[Template:Army]] produces the following: | This nation's army ensign is the same as its national flag, so [[Template:Army]] produces the following: | ||
* <code><nowiki>{{army|</nowiki>{{#invoke:String|replace|{{PAGENAME}}|^%w+ data |||false}}<nowiki>}}</nowiki></code> → {{army|{{#invoke:String|replace|{{PAGENAME}}|^%w+ data |||false}}}} | * <code><nowiki>{{army|</nowiki>{{#invoke:String|replace|{{{demopagename|{{PAGENAME}}}}}|^%w+ data |||false}}<nowiki>}}</nowiki></code> → {{army|{{#invoke:String|replace|{{{demopagename|{{PAGENAME}}}}}|^%w+ data |||false}}}} | ||
}}}} }} | }}}} }} | ||
{{#if: {{{related1|}}} | | {{#if: {{{related1|}}} | | ||
===Related templates=== | ===Related templates=== | ||
Please see the following related <code>country_data</code> templates: | Please see the following related <code>country_data</code> templates: | ||
Line 257: | Line 268: | ||
* [[Template:Country data {{{related39}}}]]<span style="position:absolute; left:33em;">{{flag|{{{related39}}}<!-- {{#if:{{{related39param|}}}|{{!}}{{{related39param}}}}} -->}}</span> }}<!-- | * [[Template:Country data {{{related39}}}]]<span style="position:absolute; left:33em;">{{flag|{{{related39}}}<!-- {{#if:{{{related39param|}}}|{{!}}{{{related39param}}}}} -->}}</span> }}<!-- | ||
-->}} | -->}} | ||
{{#ifeq:{{SUBPAGENAME}}|sandbox||{{#ifexist:{{FULLPAGENAME}}/doc | | {{#ifeq:{{SUBPAGENAME}}|sandbox||{{#ifexist:{{FULLPAGENAME}}/doc | | ||
{{#if:{{Suppress categories|{{{{FULLPAGENAME}}/doc}}}}| | {{#if:{{Suppress categories|{{{{FULLPAGENAME}}/doc}}}}| | ||
===Other information=== | ===Other information=== | ||
}} | }} | ||
Line 275: | Line 288: | ||
{{#ifeq:{{NAMESPACE}}|{{ns:Template}}|<!-- | {{#ifeq:{{NAMESPACE}}|{{ns:Template}}|<!-- | ||
-->{{#ifeq:{{SUBPAGENAME}}|sandbox|<!-- | -->{{#ifeq:{{SUBPAGENAME}}|sandbox|<!-- | ||
-->[[Category:Country data template sandboxes|{{{cat|{{#invoke:String|replace|{{PAGENAME}}|^%w+ data |||false}}}}}]]|<!-- | -->[[Category:Country data template sandboxes|{{{cat|{{#invoke:String|replace|{{{demopagename|{{PAGENAME}}}}}|^%w+ data |||false}}}}}]]|<!-- | ||
-->{{#ifexist:{{FULLPAGENAME}}/doc|<!-- | -->{{#ifexist:{{FULLPAGENAME}}/doc|<!-- | ||
-->[[Category:Country data templates with documentation subpage|{{{cat|{{#invoke:String|replace|{{PAGENAME}}|^%w+ data |||false}}}}}]]|<!-- | -->[[Category:Country data templates with documentation subpage|{{{cat|{{#invoke:String|replace|{{{demopagename|{{PAGENAME}}}}}|^%w+ data |||false}}}}}]]|<!-- | ||
-->[[Category:Uncategorized country data templates|{{{cat|{{#invoke:String|replace|{{PAGENAME}}|^%w+ data |||false}}}}}]]<!-- | -->[[Category:Uncategorized country data templates|{{{cat|{{#invoke:String|replace|{{{demopagename|{{PAGENAME}}}}}|^%w+ data |||false}}}}}]]<!-- | ||
-->}}<!-- | -->}}<!-- | ||
-->{{#if:{{{size flag alias-{{{var1}}}|}}}{{{size flag alias-{{{var2}}}|}}}{{{size flag alias-{{{var3}}}|}}}{{{size flag alias-{{{var4}}}|}}}{{{size flag alias-{{{var5}}}|}}}{{{size flag alias-{{{var6}}}|}}}{{{size flag alias-{{{var7}}}|}}}{{{size flag alias-{{{var8}}}|}}}{{{size flag alias-{{{var9}}}|}}}{{{size flag alias-{{{var10}}}|}}}{{{size flag alias-{{{var11}}}|}}}{{{size flag alias-{{{var12}}}|}}}{{{size flag alias-{{{var13}}}|}}}{{{size flag alias-{{{var14}}}|}}}{{{size flag alias-{{{var15}}}|}}}{{{size flag alias-{{{var16}}}|}}}{{{size flag alias-{{{var17}}}|}}}{{{size flag alias-{{{var18}}}|}}}{{{size flag alias-{{{var19}}}|}}}{{{size flag alias-{{{var20}}}|}}}{{{size flag alias-{{{var21}}}|}}}{{{size flag alias-{{{var22}}}|}}}{{{size flag alias-{{{var23}}}|}}}{{{size flag alias-{{{var24}}}|}}}{{{size flag alias-{{{var25}}}|}}}{{{size flag alias-{{{var26}}}|}}}{{{size flag alias-{{{var27}}}|}}}{{{size flag alias-{{{var28}}}|}}}{{{size flag alias-{{{var29}}}|}}}{{{size flag alias-{{{var30}}}|}}}{{{size flag alias-{{{var31}}}|}}}{{{size flag alias-{{{var32}}}|}}}{{{size flag alias-{{{var33}}}|}}}{{{size flag alias-{{{var34}}}|}}}{{{size flag alias-{{{var35}}}|}}}{{{size flag alias-{{{var36}}}|}}}{{{size flag alias-{{{var37}}}|}}}{{{size flag alias-{{{var38}}}|}}}{{{size flag alias-{{{var39}}}|}}}{{{size flag alias-{{{var40}}}|}}}{{{size flag alias-naval|}}}{{{size flag alias-marines|}}}{{{size flag alias-military|}}}{{{size flag alias-coast guard|}}}{{{size flag alias-navy|}}}{{{size flag alias-air force|}}}{{{size flag alias-space force|}}}{{{size flag alias-army|}}}{{{size flag alias|}}}|[[Category:Country data templates with distinct default size|{{{cat|{{#invoke:String|replace|{{PAGENAME}}|^%w+ data |||false}}}}}]]<!-- | -->{{#if:{{{size flag alias-{{{var1}}}|}}}{{{size flag alias-{{{var2}}}|}}}{{{size flag alias-{{{var3}}}|}}}{{{size flag alias-{{{var4}}}|}}}{{{size flag alias-{{{var5}}}|}}}{{{size flag alias-{{{var6}}}|}}}{{{size flag alias-{{{var7}}}|}}}{{{size flag alias-{{{var8}}}|}}}{{{size flag alias-{{{var9}}}|}}}{{{size flag alias-{{{var10}}}|}}}{{{size flag alias-{{{var11}}}|}}}{{{size flag alias-{{{var12}}}|}}}{{{size flag alias-{{{var13}}}|}}}{{{size flag alias-{{{var14}}}|}}}{{{size flag alias-{{{var15}}}|}}}{{{size flag alias-{{{var16}}}|}}}{{{size flag alias-{{{var17}}}|}}}{{{size flag alias-{{{var18}}}|}}}{{{size flag alias-{{{var19}}}|}}}{{{size flag alias-{{{var20}}}|}}}{{{size flag alias-{{{var21}}}|}}}{{{size flag alias-{{{var22}}}|}}}{{{size flag alias-{{{var23}}}|}}}{{{size flag alias-{{{var24}}}|}}}{{{size flag alias-{{{var25}}}|}}}{{{size flag alias-{{{var26}}}|}}}{{{size flag alias-{{{var27}}}|}}}{{{size flag alias-{{{var28}}}|}}}{{{size flag alias-{{{var29}}}|}}}{{{size flag alias-{{{var30}}}|}}}{{{size flag alias-{{{var31}}}|}}}{{{size flag alias-{{{var32}}}|}}}{{{size flag alias-{{{var33}}}|}}}{{{size flag alias-{{{var34}}}|}}}{{{size flag alias-{{{var35}}}|}}}{{{size flag alias-{{{var36}}}|}}}{{{size flag alias-{{{var37}}}|}}}{{{size flag alias-{{{var38}}}|}}}{{{size flag alias-{{{var39}}}|}}}{{{size flag alias-{{{var40}}}|}}}{{{size flag alias-naval|}}}{{{size flag alias-marines|}}}{{{size flag alias-military|}}}{{{size flag alias-coast guard|}}}{{{size flag alias-navy|}}}{{{size flag alias-air force|}}}{{{size flag alias-space force|}}}{{{size flag alias-army|}}}{{{size flag alias|}}}|[[Category:Country data templates with distinct default size|{{{cat|{{#invoke:String|replace|{{{demopagename|{{PAGENAME}}}}}|^%w+ data |||false}}}}}]]<!-- | ||
-->}}<!-- | -->}}<!-- | ||
-->[[Category:All country data templates|{{{cat|{{#invoke:String|replace|{{PAGENAME}}|^%w+ data |||false}}}}}]]<!-- | -->[[Category:All country data templates|{{{cat|{{#invoke:String|replace|{{{demopagename|{{PAGENAME}}}}}|^%w+ data |||false}}}}}]]<!-- | ||
-->{{#if:{{{shortname alias|}}}|<!-- | -->{{#if:{{{shortname alias|}}}|<!-- | ||
-->[[Category:Country data templates with distinct shortname|{{{cat|{{#invoke:String|replace|{{PAGENAME}}|^%w+ data |||false}}}}}]]<!-- | -->[[Category:Country data templates with distinct shortname|{{{cat|{{#invoke:String|replace|{{{demopagename|{{PAGENAME}}}}}|^%w+ data |||false}}}}}]]<!-- | ||
-->}}<!-- | -->}}<!-- | ||
-->{{#ifeq:{{PAGENAME}}|Country data {{{alias}}}||<!-- | -->{{#ifeq:{{{demopagename|{{PAGENAME}}}}}|Country data {{{alias}}}||<!-- | ||
-->{{#ifeq:{{PAGENAME}}|Country data {{{shortname alias}}}||<!-- | -->{{#ifeq:{{{demopagename|{{PAGENAME}}}}}|Country data {{{shortname alias}}}||<!-- | ||
-->[[Category:Country data templates with distinct template name|{{{cat|{{#invoke:String|replace|{{PAGENAME}}|^%w+ data |||false}}}}}]]<!-- | -->[[Category:Country data templates with distinct template name|{{{cat|{{#invoke:String|replace|{{{demopagename|{{PAGENAME}}}}}|^%w+ data |||false}}}}}]]<!-- | ||
-->}}<!-- | -->}}<!-- | ||
-->}}<!-- | -->}}<!-- | ||
-->{{#if:{{{flag alias|}}}||<!-- | -->{{#if:{{{flag alias|}}}||<!-- | ||
-->[[Category:Country data templates without flag alias|{{#invoke:String|replace|{{PAGENAME}}|^%w+ data |||false}}]]<!-- | -->[[Category:Country data templates without flag alias|{{#invoke:String|replace|{{{demopagename|{{PAGENAME}}}}}|^%w+ data |||false}}]]<!-- | ||
-->}}<!-- | -->}}<!-- | ||
-->}}<!-- | -->}}<!-- | ||
-->}} | -->}} | ||
|link box=This is the documentation for '''Template:{{PAGENAME}}'''. It is automatically generated by [[Template:Country showdata]].<br />Editors can experiment in this template's {{#ifeq:{{SUBPAGENAME}}|sandbox|'''sandbox''' ([{{fullurl:{{FULLPAGENAME}}|action=edit}} edit] {{!}} [{{fullurl:Special:ComparePages|page1=Template:{{urlencode:{{BASEPAGENAME}}}}&page2={{urlencode:{{FULLPAGENAME}}}}}} diff])|{{#ifexist:{{FULLPAGENAME}}/sandbox|[[{{FULLPAGENAME}}/sandbox|sandbox]] ([{{fullurl:{{FULLPAGENAME}}/sandbox|action=edit}} edit] {{!}} [{{fullurl:Special:ComparePages|page1={{urlencode:{{FULLPAGENAME}}}}&page2={{urlencode:{{FULLPAGENAME}}}}/sandbox}} diff])|sandbox ([{{fullurl:{{FULLPAGENAME}}/sandbox|action=edit&preload=Template:Country_showdata/preload-sandbox}} create] {{!}} [{{fullurl:{{FULLPAGENAME}}/sandbox|action=edit&preload=Template:Country_showdata/mirror&summary=Create+sandbox+version+of+{{urlencode:[[{{FULLPAGENAME}}]]}}}} mirror])}}}} and {{#ifexist:{{#ifeq:{{SUBPAGENAME}}|sandbox|Template:{{BASEPAGENAME}}|{{FULLPAGENAME}}}}/testcases|[[{{#ifeq:{{SUBPAGENAME}}|sandbox|Template:{{BASEPAGENAME}}|{{FULLPAGENAME}}}}/testcases|testcases]] ([{{fullurl:{{#ifeq:{{SUBPAGENAME}}|sandbox|Template:{{BASEPAGENAME}}|{{FULLPAGENAME}}}}/testcases|action=edit}} edit])|testcases ([{{fullurl:{{#ifeq:{{SUBPAGENAME}}|sandbox|Template:{{BASEPAGENAME}}|{{FULLPAGENAME}}}}/testcases|action=edit&preload=Template%3ADocumentation%2Fpreload-testcases}} create])}} pages.<br />Please {{purge|purge the cache}} after making any changes to this template.<!-- | |link box=This is the documentation for '''Template:{{{demopagename|{{PAGENAME}}}}}'''. It is automatically generated by [[Template:Country showdata]].<br />Editors can experiment in this template's {{#ifeq:{{SUBPAGENAME}}|sandbox|'''sandbox''' ([{{fullurl:{{FULLPAGENAME}}|action=edit}} edit] {{!}} [{{fullurl:Special:ComparePages|page1=Template:{{urlencode:{{BASEPAGENAME}}}}&page2={{urlencode:{{FULLPAGENAME}}}}}} diff])|{{#ifexist:{{FULLPAGENAME}}/sandbox|[[{{FULLPAGENAME}}/sandbox|sandbox]] ([{{fullurl:{{FULLPAGENAME}}/sandbox|action=edit}} edit] {{!}} [{{fullurl:Special:ComparePages|page1={{urlencode:{{FULLPAGENAME}}}}&page2={{urlencode:{{FULLPAGENAME}}}}/sandbox}} diff])|sandbox ([{{fullurl:{{FULLPAGENAME}}/sandbox|action=edit&preload=Template:Country_showdata/preload-sandbox}} create] {{!}} [{{fullurl:{{FULLPAGENAME}}/sandbox|action=edit&preload=Template:Country_showdata/mirror&summary=Create+sandbox+version+of+{{urlencode:[[{{FULLPAGENAME}}]]}}}} mirror])}}}} and {{#ifexist:{{#ifeq:{{SUBPAGENAME}}|sandbox|Template:{{BASEPAGENAME}}|{{FULLPAGENAME}}}}/testcases|[[{{#ifeq:{{SUBPAGENAME}}|sandbox|Template:{{BASEPAGENAME}}|{{FULLPAGENAME}}}}/testcases|testcases]] ([{{fullurl:{{#ifeq:{{SUBPAGENAME}}|sandbox|Template:{{BASEPAGENAME}}|{{FULLPAGENAME}}}}/testcases|action=edit}} edit])|testcases ([{{fullurl:{{#ifeq:{{SUBPAGENAME}}|sandbox|Template:{{BASEPAGENAME}}|{{FULLPAGENAME}}}}/testcases|action=edit&preload=Template%3ADocumentation%2Fpreload-testcases}} create])}} pages.<br />Please {{purge|purge the cache}} after making any changes to this template.<!-- | ||
-->{{#ifeq:{{SUBPAGENAME}}|sandbox||{{#ifexist:{{FULLPAGENAME}}/doc|<!-- | -->{{#ifeq:{{SUBPAGENAME}}|sandbox||{{#ifexist:{{FULLPAGENAME}}/doc|<!-- | ||
--><br />This template has a [[{{FULLPAGENAME}}/doc|/doc]] subpage for the purposes of [[WP:CAT|categories]] and documentation specific to this template.|<!-- | --><br />This template has a [[{{FULLPAGENAME}}/doc|/doc]] subpage for the purposes of [[WP:CAT|categories]] and documentation specific to this template.|<!-- |
Latest revision as of 17:07, 12 May 2023
Template documentation
|
---|
Note: portions of the template sample may not be visible without values provided. |
View or edit this documentation. (About template documentation) |
Editors can experiment in this template's sandbox and test case pages. |
This template is used on approximately 5,700 pages and changes may be widely noticed. Test changes in the template's /sandbox or /testcases subpages, or in your own user subpage. Consider discussing changes on the talk page before implementing them. |
This template uses Lua: |
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 [[Ireland|entire island]], see [[Template:Country data Ireland]].}}
results in:
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 var1
to var40
). 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 IOC or FIFA. 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 redir1
to redir5
).
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 related1
to related6
).
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:
- Template:Country data Ireland/doc is used to explain why that template is distinct from Template:Country data Republic of Ireland
- Template:Country data France/doc is used to document the list of country data templates available for each of the regions of France
- Template:Country data United States/doc is used to document the full set of flag variants (for each number of stars), and to list all of the country data templates available for state and territory flags
- Template:Country data Empire of Japan/doc sorts its template into individualized categories.
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 country or by 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:
- Category:All country data templates (0)
- Category:Country data template sandboxes (0)
- Category:Country data templates with distinct default size (0)
- Category:Country data templates with distinct shortname (0)
- Category:Country data templates with distinct template name (0)
- Category:Country data templates with documentation subpage (0)
- Category:Country data templates without flag alias (0)
- Category:Uncategorized country data templates (0)
Manually added to templates or documentation pages:
- Category:Country data templates of countries (2)
- Category:Subnational country data templates (0)
- Category:Country data templates of cities (0)
- Category:Country data templates of continents (0)
- Category:Country data templates of dependent territories (0)
- Category:Country data templates of geographical regions (0)
- Category:Country data templates of governments (0)
- Category:Country data templates of historical entities (0)
- Category:Country data templates of international organizations (0)
- Category:Country data templates of micronations (0)