Template:Country showdata: Difference between revisions
meta>Varnent added missing </tr> to standard parameters table |
m Cosmetic changes Tag: 2017 source edit |
||
(94 intermediate revisions by 18 users not shown) | |||
Line 1: | Line 1: | ||
<includeonly>__NOEDITSECTION__ | <includeonly>__NOEDITSECTION__ | ||
{{ | {{Documentation|content={{Kbd|Template:{{ROOTPAGENAME}}}} is an internal data container not intended to be transcluded directly. It is used indirectly by templates such as {{Template link general|plainode=on|Flag}}, {{Template link general|plaincode=on|Flagicon}} and others. | ||
{{ | [[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"> | ||
<tr><th>Parameter name</th><th>Value</th><th>Meaning</th> | <tr><th scope="col">Parameter name</th><th scope="col">Value</th><th scope="col">Meaning</th></tr> | ||
</tr><tr> | <tr> | ||
<td>< | <td><code>alias</code></td> | ||
<td>{{#if: {{{alias|}}} | < | <td>{{#if:{{{alias|}}}|<code>{{{alias}}}</code>|<span style="color: red; font-weight: 700;">undefined!</span>}}</td> | ||
<td>Main article name ([[{{{alias}}}]])</td> | <td>Main article name ([[{{{alias|}}}]])</td> | ||
</tr> | </tr> | ||
{{#if: {{{shortname alias|}}} | | {{#if:{{{shortname alias|}}}| <tr> | ||
<tr> | <td><code>shortname alias</code></td> | ||
<td>< | <td><code>{{{shortname alias}}}</code></td> | ||
<td>< | <td>''(optional)'' Display name to be used for the wikilink, if <code>alias</code> is a disambiguated article name, for example</td> | ||
<td>''(optional)'' Display name to be used for the wikilink, if < | </tr>}} | ||
</tr> | <tr> | ||
<td><code>flag alias</code></td> | |||
<td>{{#if:{{{flag alias|}}}|<code>{{{flag alias}}}</code>|<span style="color: red; font-weight: 700;">undefined!</span>}}</td> | |||
<td>Image name ([[:File:{{{flag alias}}}]], shown on right)</td> | |||
</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|}}}}}}}}}}}}}}}}}}}}}}}}}}}| | |||
=== Flag variants === | |||
{{#if:{{{flag link|}}}|{{Details|{{{flag link}}}}}|{{#ifexist:Flag of {{{alias}}}|{{Details|Flag of {{{alias}}}}}|}}}} | |||
{{#ifeq:{{{variant|♦}}}|♦|{{Red|Note: These variants cannot be used unless the line <code>{{!}} variant {{=}} {{(((}}variant{{!}}{{)))}}</code> is added to this template.}}}} | |||
<table class="wikitable"> | |||
<tr><th scope="col">Label</th><th scope="col">Flag image (40px)</th><th scope="col">Image name</th></tr> | |||
{{#if:{{{var1|}}}|<tr><td><code>{{{var1}}}</code></td><td style="text-align: center;">[[File:{{{flag alias-{{{var1}}}}}}|40px|{{{border-{{{var1}}}|{{{border|border}}}}}}]]</td><td><code>{{{flag alias-{{{var1}}}}}}</code></td></tr>}}<!-- | |||
-->{{#if:{{{var2|}}}|<tr><td><code>{{{var2}}}</code></td><td style="text-align: center;">[[File:{{{flag alias-{{{var2}}}}}}|40px|{{{border-{{{var2}}}|{{{border|border}}}}}}]]</td><td><code>{{{flag alias-{{{var2}}}}}}</code></td></tr>}}<!-- | |||
-->{{#if:{{{var3|}}}|<tr><td><code>{{{var3}}}</code></td><td style="text-align: center;">[[File:{{{flag alias-{{{var3}}}}}}|40px|{{{border-{{{var3}}}|{{{border|border}}}}}}]]</td><td><code>{{{flag alias-{{{var3}}}}}}</code></td></tr>}}<!-- | |||
-->{{#if:{{{var4|}}}|<tr><td><code>{{{var4}}}</code></td><td style="text-align: center;">[[File:{{{flag alias-{{{var4}}}}}}|40px|{{{border-{{{var4}}}|{{{border|border}}}}}}]]</td><td><code>{{{flag alias-{{{var4}}}}}}</code></td></tr>}}<!-- | |||
-->{{#if:{{{var5|}}}|<tr><td><code>{{{var5}}}</code></td><td style="text-align: center;">[[File:{{{flag alias-{{{var5}}}}}}|40px|{{{border-{{{var5}}}|{{{border|border}}}}}}]]</td><td><code>{{{flag alias-{{{var5}}}}}}</code></td></tr>}}<!-- | |||
-->{{#if:{{{var6|}}}|<tr><td><code>{{{var6}}}</code></td><td style="text-align: center;">[[File:{{{flag alias-{{{var6}}}}}}|40px|{{{border-{{{var6}}}|{{{border|border}}}}}}]]</td><td><code>{{{flag alias-{{{var6}}}}}}</code></td></tr>}}<!-- | |||
-->{{#if:{{{var7|}}}|<tr><td><code>{{{var7}}}</code></td><td style="text-align: center;">[[File:{{{flag alias-{{{var7}}}}}}|40px|{{{border-{{{var7}}}|{{{border|border}}}}}}]]</td><td><code>{{{flag alias-{{{var7}}}}}}</code></td></tr>}}<!-- | |||
-->{{#if:{{{var8|}}}|<tr><td><code>{{{var8}}}</code></td><td style="text-align: center;">[[File:{{{flag alias-{{{var8}}}}}}|40px|{{{border-{{{var8}}}|{{{border|border}}}}}}]]</td><td><code>{{{flag alias-{{{var8}}}}}}</code></td></tr>}}<!-- | |||
-->{{#if:{{{var9|}}}|<tr><td><code>{{{var9}}}</code></td><td style="text-align: center;">[[File:{{{flag alias-{{{var9}}}}}}|40px|{{{border-{{{var9}}}|{{{border|border}}}}}}]]</td><td><code>{{{flag alias-{{{var9}}}}}}</code></td></tr>}}<!-- | |||
-->{{#if:{{{var10|}}}|<tr><td><code>{{{var10}}}</code></td><td style="text-align: center;">[[File:{{{flag alias-{{{var10}}}}}}|40px|{{{border-{{{var10}}}|{{{border|border}}}}}}]]</td><td><code>{{{flag alias-{{{var10}}}}}}</code></td></tr>}}<!-- | |||
-->{{#if:{{{var11|}}}|<tr><td><code>{{{var11}}}</code></td><td style="text-align: center;">[[File:{{{flag alias-{{{var11}}}}}}|40px|{{{border-{{{var11}}}|{{{border|border}}}}}}]]</td><td><code>{{{flag alias-{{{var11}}}}}}</code></td></tr>}}<!-- | |||
-->{{#if:{{{var12|}}}|<tr><td><code>{{{var12}}}</code></td><td style="text-align: center;">[[File:{{{flag alias-{{{var12}}}}}}|40px|{{{border-{{{var12}}}|{{{border|border}}}}}}]]</td><td><code>{{{flag alias-{{{var12}}}}}}</code></td></tr>}}<!-- | |||
-->{{#if:{{{var13|}}}|<tr><td><code>{{{var13}}}</code></td><td style="text-align: center;">[[File:{{{flag alias-{{{var13}}}}}}|40px|{{{border-{{{var13}}}|{{{border|border}}}}}}]]</td><td><code>{{{flag alias-{{{var13}}}}}}</code></td></tr>}}<!-- | |||
-->{{#if:{{{var14|}}}|<tr><td><code>{{{var14}}}</code></td><td style="text-align: center;">[[File:{{{flag alias-{{{var14}}}}}}|40px|{{{border-{{{var14}}}|{{{border|border}}}}}}]]</td><td><code>{{{flag alias-{{{var14}}}}}}</code></td></tr>}}<!-- | |||
-->{{#if:{{{var15|}}}|<tr><td><code>{{{var15}}}</code></td><td style="text-align: center;">[[File:{{{flag alias-{{{var15}}}}}}|40px|{{{border-{{{var15}}}|{{{border|border}}}}}}]]</td><td><code>{{{flag alias-{{{var15}}}}}}</code></td></tr>}}<!-- | |||
-->{{#if:{{{var16|}}}|<tr><td><code>{{{var16}}}</code></td><td style="text-align: center;">[[File:{{{flag alias-{{{var16}}}}}}|40px|{{{border-{{{var16}}}|{{{border|border}}}}}}]]</td><td><code>{{{flag alias-{{{var16}}}}}}</code></td></tr>}}<!-- | |||
-->{{#if:{{{var17|}}}|<tr><td><code>{{{var17}}}</code></td><td style="text-align: center;">[[File:{{{flag alias-{{{var17}}}}}}|40px|{{{border-{{{var17}}}|{{{border|border}}}}}}]]</td><td><code>{{{flag alias-{{{var17}}}}}}</code></td></tr>}}<!-- | |||
-->{{#if:{{{var18|}}}|<tr><td><code>{{{var18}}}</code></td><td style="text-align: center;">[[File:{{{flag alias-{{{var18}}}}}}|40px|{{{border-{{{var18}}}|{{{border|border}}}}}}]]</td><td><code>{{{flag alias-{{{var18}}}}}}</code></td></tr>}}<!-- | |||
-->{{#if:{{{var19|}}}|<tr><td><code>{{{var19}}}</code></td><td style="text-align: center;">[[File:{{{flag alias-{{{var19}}}}}}|40px|{{{border-{{{var19}}}|{{{border|border}}}}}}]]</td><td><code>{{{flag alias-{{{var19}}}}}}</code></td></tr>}}<!-- | |||
-->{{#if:{{{var20|}}}|<tr><td><code>{{{var20}}}</code></td><td style="text-align: center;">[[File:{{{flag alias-{{{var20}}}}}}|40px|{{{border-{{{var20}}}|{{{border|border}}}}}}]]</td><td><code>{{{flag alias-{{{var20}}}}}}</code></td></tr>}}<!-- | |||
-->{{#if:{{{var21|}}}|<tr><td><code>{{{var21}}}</code></td><td style="text-align: center;">[[File:{{{flag alias-{{{var21}}}}}}|40px|{{{border-{{{var21}}}|{{{border|border}}}}}}]]</td><td><code>{{{flag alias-{{{var21}}}}}}</code></td></tr>}}<!-- | |||
-->{{#if:{{{var22|}}}|<tr><td><code>{{{var22}}}</code></td><td style="text-align: center;">[[File:{{{flag alias-{{{var22}}}}}}|40px|{{{border-{{{var22}}}|{{{border|border}}}}}}]]</td><td><code>{{{flag alias-{{{var22}}}}}}</code></td></tr>}}<!-- | |||
-->{{#if:{{{var23|}}}|<tr><td><code>{{{var23}}}</code></td><td style="text-align: center;">[[File:{{{flag alias-{{{var23}}}}}}|40px|{{{border-{{{var23}}}|{{{border|border}}}}}}]]</td><td><code>{{{flag alias-{{{var23}}}}}}</code></td></tr>}}<!-- | |||
-->{{#if:{{{var24|}}}|<tr><td><code>{{{var24}}}</code></td><td style="text-align: center;">[[File:{{{flag alias-{{{var24}}}}}}|40px|{{{border-{{{var24}}}|{{{border|border}}}}}}]]</td><td><code>{{{flag alias-{{{var24}}}}}}</code></td></tr>}}<!-- | |||
-->{{#if:{{{var25|}}}|<tr><td><code>{{{var25}}}</code></td><td style="text-align: center;">[[File:{{{flag alias-{{{var25}}}}}}|40px|{{{border-{{{var25}}}|{{{border|border}}}}}}]]</td><td><code>{{{flag alias-{{{var25}}}}}}</code></td></tr>}}<!-- | |||
-->{{#if:{{{var26|}}}|<tr><td><code>{{{var26}}}</code></td><td style="text-align: center;">[[File:{{{flag alias-{{{var26}}}}}}|40px|{{{border-{{{var26}}}|{{{border|border}}}}}}]]</td><td><code>{{{flag alias-{{{var26}}}}}}</code></td></tr>}}<!-- | |||
-->{{#if:{{{var27|}}}|<tr><td><code>{{{var27}}}</code></td><td style="text-align: center;">[[File:{{{flag alias-{{{var27}}}}}}|40px|{{{border-{{{var27}}}|{{{border|border}}}}}}]]</td><td><code>{{{flag alias-{{{var27}}}}}}</code></td></tr>}}<!-- | |||
-->{{#if:{{{var28|}}}|<tr><td><code>{{{var28}}}</code></td><td style="text-align: center;">[[File:{{{flag alias-{{{var28}}}}}}|40px|{{{border-{{{var28}}}|{{{border|border}}}}}}]]</td><td><code>{{{flag alias-{{{var28}}}}}}</code></td></tr>}}<!-- | |||
-->{{#if:{{{var29|}}}|<tr><td><code>{{{var29}}}</code></td><td style="text-align: center;">[[File:{{{flag alias-{{{var29}}}}}}|40px|{{{border-{{{var29}}}|{{{border|border}}}}}}]]</td><td><code>{{{flag alias-{{{var29}}}}}}</code></td></tr>}}<!-- | |||
-->{{#if:{{{var30|}}}|<tr><td><code>{{{var30}}}</code></td><td style="text-align: center;">[[File:{{{flag alias-{{{var30}}}}}}|40px|{{{border-{{{var30}}}|{{{border|border}}}}}}]]</td><td><code>{{{flag alias-{{{var30}}}}}}</code></td></tr>}}<!-- | |||
-->{{#if:{{{var31|}}}|<tr><td><code>{{{var31}}}</code></td><td style="text-align: center;">[[File:{{{flag alias-{{{var31}}}}}}|40px|{{{border-{{{var31}}}|{{{border|border}}}}}}]]</td><td><code>{{{flag alias-{{{var31}}}}}}</code></td></tr>}}<!-- | |||
-->{{#if:{{{var32|}}}|<tr><td><code>{{{var32}}}</code></td><td style="text-align: center;">[[File:{{{flag alias-{{{var32}}}}}}|40px|{{{border-{{{var32}}}|{{{border|border}}}}}}]]</td><td><code>{{{flag alias-{{{var32}}}}}}</code></td></tr>}}<!-- | |||
-->{{#if:{{{var33|}}}|<tr><td><code>{{{var33}}}</code></td><td style="text-align: center;">[[File:{{{flag alias-{{{var33}}}}}}|40px|{{{border-{{{var33}}}|{{{border|border}}}}}}]]</td><td><code>{{{flag alias-{{{var33}}}}}}</code></td></tr>}}<!-- | |||
-->{{#if:{{{var34|}}}|<tr><td><code>{{{var34}}}</code></td><td style="text-align: center;">[[File:{{{flag alias-{{{var34}}}}}}|40px|{{{border-{{{var34}}}|{{{border|border}}}}}}]]</td><td><code>{{{flag alias-{{{var34}}}}}}</code></td></tr>}}<!-- | |||
-->{{#if:{{{var35|}}}|<tr><td><code>{{{var35}}}</code></td><td style="text-align: center;">[[File:{{{flag alias-{{{var35}}}}}}|40px|{{{border-{{{var35}}}|{{{border|border}}}}}}]]</td><td><code>{{{flag alias-{{{var35}}}}}}</code></td></tr>}}<!-- | |||
-->{{#if:{{{var36|}}}|<tr><td><code>{{{var36}}}</code></td><td style="text-align: center;">[[File:{{{flag alias-{{{var36}}}}}}|40px|{{{border-{{{var36}}}|{{{border|border}}}}}}]]</td><td><code>{{{flag alias-{{{var36}}}}}}</code></td></tr>}}<!-- | |||
-->{{#if:{{{var37|}}}|<tr><td><code>{{{var37}}}</code></td><td style="text-align: center;">[[File:{{{flag alias-{{{var37}}}}}}|40px|{{{border-{{{var37}}}|{{{border|border}}}}}}]]</td><td><code>{{{flag alias-{{{var37}}}}}}</code></td></tr>}}<!-- | |||
-->{{#if:{{{var38|}}}|<tr><td><code>{{{var38}}}</code></td><td style="text-align: center;">[[File:{{{flag alias-{{{var38}}}}}}|40px|{{{border-{{{var38}}}|{{{border|border}}}}}}]]</td><td><code>{{{flag alias-{{{var38}}}}}}</code></td></tr>}}<!-- | |||
-->{{#if:{{{var39|}}}|<tr><td><code>{{{var39}}}</code></td><td style="text-align: center;">[[File:{{{flag alias-{{{var39}}}}}}|40px|{{{border-{{{var39}}}|{{{border|border}}}}}}]]</td><td><code>{{{flag alias-{{{var39}}}}}}</code></td></tr>}}<!-- | |||
-->{{#if:{{{var40|}}}|<tr><td><code>{{{var40}}}</code></td><td style="text-align: center;">[[File:{{{flag alias-{{{var40}}}}}}|40px|{{{border-{{{var40}}}|{{{border|border}}}}}}]]</td><td><code>{{{flag alias-{{{var40}}}}}}</code></td></tr>}}<!-- | |||
-->{{#if:{{{flag alias-naval|}}}|<tr><td><code>naval</code></td><td style="text-align: center;">[[File:{{{flag alias-naval}}}|40px|{{{border-naval|{{{border|border}}}}}}]]</td><td><code>{{{flag alias-naval}}}</code></td></tr>}}<!-- | |||
-->{{#if:{{{flag alias-marines|}}}|<tr><td><code>marines</code></td><td style="text-align: center;">[[File:{{{flag alias-marines}}}|40px|{{{border-marines|{{{border|border}}}}}}]]</td><td><code>{{{flag alias-marines}}}</code></td></tr>}}<!-- | |||
-->{{#if:{{{flag alias-military|}}}|<tr><td><code>military</code></td><td style="text-align: center;">[[File:{{{flag alias-military}}}|40px|{{{border-military|{{{border|border}}}}}}]]</td><td><code>{{{flag alias-military}}}</code></td></tr>}}<!-- | |||
-->{{#if:{{{flag alias-coast guard|}}}|<tr><td><code>coast guard</code></td><td style="text-align: center;">[[File:{{{flag alias-coast guard}}}|40px|{{{border-coast guard|{{{border|border}}}}}}]]</td><td><code>{{{flag alias-coast guard}}}</code></td></tr>}}<!-- | |||
-->{{#if:{{{flag alias-navy|}}}|<tr><td><code>navy</code></td><td style="text-align:center;">[[File:{{{flag alias-navy}}}|40px|{{{border-navy|{{{border|border}}}}}}]]</td><td><code>{{{flag alias-navy}}}</code></td></tr>}}<!-- | |||
-->{{#if:{{{flag alias-air force|}}}|<tr><td><code>air force</code></td><td style="text-align: center;">[[File:{{{flag alias-air force}}}|40px|{{{border-air force|{{{border|border}}}}}}]]</td><td><code>{{{flag alias-air force}}}</code></td></tr>}}<!-- | |||
-->{{#if:{{{flag alias-space force|}}}|<tr><td><code>space force</code></td><td style="text-align: center;">[[File:{{{flag alias-space force}}}|40px|{{{border-space force|{{{border|border}}}}}}]]</td><td><code>{{{flag alias-space force}}}</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> | |||
}} | }} | ||
< | |||
< | {{#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 === | ||
< | {{#if:{{{flag alias-naval|}}}|This template includes a naval ensign flag variant that can be used with [[Template:Navy]]: | ||
</ | * <code><nowiki>{{Navy|</nowiki>{{#invoke:String|replace|{{PAGENAME}}|^%w+ data |||false}}<nowiki>}}</nowiki></code> → {{Navy|{{#invoke:String|replace|{{PAGENAME}}|^%w+ data |||false}}}} | ||
{{#if: {{{ | * <code><nowiki>{{Flagicon|</nowiki>{{#invoke:String|replace|{{PAGENAME}}|^%w+ data |||false}}<nowiki>|naval}}</nowiki></code> → {{Flagicon|{{#invoke:String|replace|{{PAGENAME}}|^%w+ data |||false}}|naval}} | ||
|{{#if:{{{link alias-naval|}}}|This nation's naval ensign is the same as its national flag, so [[Template:Navy]] produces the following: | |||
{{# | * <code><nowiki>{{Navy|</nowiki>{{#invoke:String|replace|{{PAGENAME}}|^%w+ data |||false}}<nowiki>}}</nowiki></code> → {{Navy|{{#invoke:String|replace|{{PAGENAME}}|^%w+ data |||false}}}} | ||
}}}}{{#if:{{{flag alias-air force|}}}|{{Break}}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>{{Flagicon|</nowiki>{{#invoke:String|replace|{{PAGENAME}}|^%w+ data |||false}}<nowiki>|air force}}</nowiki></code> → {{Flagicon|{{#invoke:String|replace|{{PAGENAME}}|^%w+ data |||false}}|air force}} | |||
|{{#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: | |||
* <code><nowiki>{{Air force|</nowiki>{{#invoke:String|replace|{{PAGENAME}}|^%w+ data |||false}}<nowiki>}}</nowiki></code> → {{Air force|{{#invoke:String|replace|{{PAGENAME}}|^%w+ data |||false}}}} | |||
}}}}{{#if:{{{flag alias-space force|}}}|{{Break}}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>{{Flagicon|</nowiki>{{#invoke:String|replace|{{PAGENAME}}|^%w+ data |||false}}<nowiki>|space force}}</nowiki></code> → {{Flagicon|{{#invoke:String|replace|{{PAGENAME}}|^%w+ data |||false}}|space force}} | |||
|{{#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: | |||
* <code><nowiki>{{Space force|</nowiki>{{#invoke:String|replace|{{PAGENAME}}|^%w+ data |||false}}<nowiki>}}</nowiki></code> → {{Space force|{{#invoke:String|replace|{{PAGENAME}}|^%w+ data |||false}}}} | |||
}}}}{{#if:{{{flag alias-marines|}}}|{{Break}}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>{{Flagicon|</nowiki>{{#invoke:String|replace|{{PAGENAME}}|^%w+ data |||false}}<nowiki>|marines}}</nowiki></code> → {{Flagicon|{{#invoke:String|replace|{{PAGENAME}}|^%w+ data |||false}}|marines}} | |||
|{{#if:{{{link alias-marines|}}}|{{Break}}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}}}} | |||
}}}}{{#if:{{{flag alias-military|}}}|{{Break}}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>{{Flagicon|</nowiki>{{#invoke:String|replace|{{PAGENAME}}|^%w+ data |||false}}<nowiki>|military}}</nowiki></code> → {{Flagicon|{{#invoke:String|replace|{{PAGENAME}}|^%w+ data |||false}}|military}} | |||
|{{#if:{{{link alias-military|}}}|{{Break}}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}}}} | |||
}}}}{{#if:{{{flag alias-navy|}}}|{{Break}}This template includes a navy flag variant that can be used with [[Template:Naval]]: | |||
* <code><nowiki>{{Naval|</nowiki>{{#invoke:String|replace|{{PAGENAME}}|^%w+ data |||false}}<nowiki>}}</nowiki></code> → {{Naval|{{#invoke:String|replace|{{PAGENAME}}|^%w+ data |||false}}}} | |||
* <code><nowiki>{{Flagicon|</nowiki>{{#invoke:String|replace|{{PAGENAME}}|^%w+ data |||false}}<nowiki>|navy}}</nowiki></code> → {{Flagicon|{{#invoke:String|replace|{{PAGENAME}}|^%w+ data |||false}}|navy}} | |||
|{{#if:{{{link alias-navy|}}}|{{Break}}This nation's navy flag is the same as its national flag, so [[Template:Naval]] produces the following: | |||
* <code><nowiki>{{Naval|</nowiki>{{#invoke:String|replace|{{PAGENAME}}|^%w+ data |||false}}<nowiki>}}</nowiki></code> → {{Naval|{{#invoke:String|replace|{{PAGENAME}}|^%w+ data |||false}}}} | |||
}}}}{{#if:{{{flag alias-coast guard|}}}|{{Break}}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>{{Flagicon|</nowiki>{{#invoke:String|replace|{{PAGENAME}}|^%w+ data |||false}}<nowiki>|coast guard}}</nowiki></code> → {{Flagicon|{{#invoke:String|replace|{{PAGENAME}}|^%w+ data |||false}}|coast guard}} | |||
|{{#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: | |||
* <code><nowiki>{{Coast guard|</nowiki>{{#invoke:String|replace|{{PAGENAME}}|^%w+ data |||false}}<nowiki>}}</nowiki></code> → {{Coast guard|{{#invoke:String|replace|{{PAGENAME}}|^%w+ data |||false}}}} | |||
}}}}{{#if:{{{flag alias-army|}}}|{{Break}}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>{{Flagicon|</nowiki>{{#invoke:String|replace|{{PAGENAME}}|^%w+ data |||false}}<nowiki>|army}}</nowiki></code> → {{Flagicon|{{#invoke:String|replace|{{PAGENAME}}|^%w+ data |||false}}|army}} | |||
|{{#if:{{{link alias-army|}}}|{{Break}}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}}}} | |||
}}}}}} | |||
{{#if:{{{redir1|}}}| | |||
=== Redirect aliases === | |||
This template can also be used via an ''alias'' name (implemented as a redirect to this template): | |||
<table class="wikitable"> | <table class="wikitable"> | ||
<tr><th> | <tr><th scope="col">Alias name</th><th scope="col">{{Tlx|Flag|{{Var|alias}}}} output</th><th scope="col">{{Tlx|Flagcountry|{{Var|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: {{{ | -->{{#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>}} | |||
-->{{#if: {{{ | </table> | ||
See [{{fullurl:Special:WhatLinksHere/{{FULLPAGENAMEE}}|hidelinks=1&hidetrans=1}} What links here] for a full list of redirects. | |||
-->{{#if: {{{ | |||
-->{{#if: {{{ | |||
}} | }} | ||
=== | === Example usage === | ||
* <code><nowiki>{{Flag|</nowiki>{{#invoke:String|replace|{{PAGENAME}}|^%w+ data |||false}}<nowiki>}}</nowiki></code> → {{Flag|{{#invoke:String|replace|{{PAGENAME}}|^%w+ data |||false}}}} | |||
* <code><nowiki>{{Flagicon|</nowiki>{{#invoke:String|replace|{{PAGENAME}}|^%w+ data |||false}}<nowiki>}}</nowiki></code> → {{Flagicon|{{#invoke:String|replace|{{PAGENAME}}|^%w+ data |||false}}}}<!-- | |||
* < | -->{{#if:{{{shortname alias|}}}| | ||
* < | * <code><nowiki>{{Flagcountry|</nowiki>{{#invoke:String|replace|{{PAGENAME}}|^%w+ data |||false}}<nowiki>}}</nowiki></code> → {{Flagcountry|{{#invoke:String|replace|{{PAGENAME}}|^%w+ data |||false}}}}}} | ||
{{#if:{{{var1|}}}| | |||
* < | ==== Using a flag variant ==== | ||
* <code><nowiki>{{Flag|</nowiki>{{#invoke:String|replace|{{PAGENAME}}|^%w+ data |||false}}<nowiki>|</nowiki>{{{var1}}}<nowiki>}}</nowiki></code> → {{Flag|{{#invoke:String|replace|{{PAGENAME}}|^%w+ data |||false}}|{{{var1}}}}} | |||
{{#if: {{{ | * <code><nowiki>{{Flagicon|</nowiki>{{#invoke:String|replace|{{PAGENAME}}|^%w+ data |||false}}<nowiki>|</nowiki>{{{var1}}}<nowiki>}}</nowiki></code> → {{Flagicon|{{#invoke:String|replace|{{PAGENAME}}|^%w+ data |||false}}|{{{var1}}}}} | ||
* < | |||
* < | |||
}} | }} | ||
{{#if: {{{ | |||
{{#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:{{{related1|}}}| | |||
=== Related templates === | |||
-- | Please see the following related <code>country_data</code> templates: | ||
* [[Template:Country data {{{related1}}}]]<span style="left: 33em; position: absolute;">{{Flag|{{{related1}}}<!-- {{#if:{{{related1param|}}}|{{!}}{{{related1param}}}}} -->}}</span><!-- | |||
{{#if: {{{ | -->{{#if:{{{related2|}}}| | ||
* [[Template:Country data {{{related2}}}]]<span style="left: 33em; position: absolute;">{{Flag|{{{related2}}}<!-- {{#if:{{{related2param|}}}|{{!}}{{{related2param}}}}} -->}}</span>}}<!-- | |||
-->{{#if:{{{related3|}}}| | |||
* [[Template:Country data {{{related3}}}]]<span style="left: 33em; position: absolute;">{{Flag|{{{related3}}}<!-- {{#if:{{{related3param|}}}|{{!}}{{{related3param}}}}} -->}}</span>}}<!-- | |||
}} | -->{{#if:{{{related4|}}}| | ||
{{#if: {{{ | * [[Template:Country data {{{related4}}}]]<span style="left: 33em; position: absolute;">{{Flag|{{{related4}}}<!-- {{#if:{{{related4param|}}}|{{!}}{{{related4param}}}}} -->}}</span>}}<!-- | ||
-->{{#if:{{{related5|}}}| | |||
* | * [[Template:Country data {{{related5}}}]]<span style="left: 33em; position: absolute;">{{Flag|{{{related5}}}<!-- {{#if:{{{related5param|}}}|{{!}}{{{related5param}}}}} -->}}</span>}}<!-- | ||
-->{{#if:{{{related6|}}}| | |||
* [[Template:Country data {{{related6}}}]]<span style="left: 33em; position: absolute;">{{Flag|{{{related6}}}<!-- {{#if:{{{related6param|}}}|{{!}}{{{related6param}}}}} -->}}</span>}}<!-- | |||
-->{{#if:{{{related7|}}}| | |||
* [[Template:Country data {{{related7}}}]]<span style="left: 33em; position: absolute;">{{Flag|{{{related7}}}<!-- {{#if:{{{related7param|}}}|{{!}}{{{related7param}}}}} -->}}</span>}}<!-- | |||
= | -->{{#if:{{{related8|}}}| | ||
* [[Template:Country data {{{related8}}}]]<span style="left: 33em; position: absolute;">{{Flag|{{{related8}}}<!-- {{#if:{{{related8param|}}}|{{!}}{{{related8param}}}}} -->}}</span>}}<!-- | |||
-->{{#if:{{{related9|}}}| | |||
* [[Template:Country data {{{related9}}}]]<span style="left: 33em; position: absolute;">{{Flag|{{{related9}}}<!-- {{#if:{{{related9param|}}}|{{!}}{{{related9param}}}}} -->}}</span>}}<!-- | |||
-->{{#if:{{{related10|}}}| | |||
-->{{#if: {{{ | * [[Template:Country data {{{related10}}}]]<span style="left: 33em; position: absolute;">{{Flag|{{{related10}}}<!-- {{#if:{{{related10param|}}}|{{!}}{{{related10param}}}}} -->}}</span>}}<!-- | ||
* [[Template:Country data {{{ | -->{{#if:{{{related11|}}}| | ||
* [[Template:Country data {{{related11}}}]]<span style="left: 33em; position: absolute;">{{Flag|{{{related11}}}<!-- {{#if:{{{related11param|}}}|{{!}}{{{related11param}}}}} -->}}</span>}}<!-- | |||
-->{{#if:{{{related12|}}}| | |||
-->{{#if: {{{ | * [[Template:Country data {{{related12}}}]]<span style="left: 33em; position: absolute;">{{Flag|{{{related12}}}<!-- {{#if:{{{related12param|}}}|{{!}}{{{related12param}}}}} -->}}</span>}}<!-- | ||
* [[Template:Country data {{{ | -->{{#if:{{{related13|}}}| | ||
* [[Template:Country data {{{related13}}}]]<span style="left: 33em; position: absolute;">{{Flag|{{{related13}}}<!-- {{#if:{{{related13param|}}}|{{!}}{{{related13param}}}}} -->}}</span>}}<!-- | |||
-->{{#if:{{{related14|}}}| | |||
* [[Template:Country data {{{related14}}}]]<span style="left: 33em; position: absolute;">{{Flag|{{{related14}}}<!-- {{#if:{{{related14param|}}}|{{!}}{{{related14param}}}}} -->}}</span>}}<!-- | |||
-->{{#if:{{{related15|}}}| | |||
* [[Template:Country data {{{related15}}}]]<span style="left: 33em; position: absolute;">{{Flag|{{{related15}}}<!-- {{#if:{{{related15param|}}}|{{!}}{{{related15param}}}}} -->}}</span>}}<!-- | |||
-->{{#if:{{{related16|}}}| | |||
* [[Template:Country data {{{related16}}}]]<span style="left: 33em; position: absolute;">{{Flag|{{{related16}}}<!-- {{#if:{{{related16param|}}}|{{!}}{{{related16param}}}}} -->}}</span>}}<!-- | |||
-->{{#if:{{{related17|}}}| | |||
* [[Template:Country data {{{related17}}}]]<span style="left: 33em; position: absolute;">{{Flag|{{{related17}}}<!-- {{#if:{{{related17param|}}}|{{!}}{{{related17param}}}}} -->}}</span>}}<!-- | |||
-->{{#if:{{{related18|}}}| | |||
* [[Template:Country data {{{related18}}}]]<span style="left: 33em; position: absolute;">{{Flag|{{{related18}}}<!-- {{#if:{{{related18param|}}}|{{!}}{{{related18param}}}}} -->}}</span>}}<!-- | |||
-->{{#if:{{{related19|}}}| | |||
* [[Template:Country data {{{related19}}}]]<span style="left: 33em; position: absolute;">{{Flag|{{{related19}}}<!-- {{#if:{{{related19param|}}}|{{!}}{{{related19param}}}}} -->}}</span>}}<!-- | |||
-->{{#if:{{{related20|}}}| | |||
* [[Template:Country data {{{related20}}}]]<span style="left: 33em; position: absolute;">{{Flag|{{{related20}}}<!-- {{#if:{{{related20param|}}}|{{!}}{{{related20param}}}}} -->}}</span>}}<!-- | |||
-->{{#if:{{{related21|}}}| | |||
* [[Template:Country data {{{related21}}}]]<span style="left: 33em; position: absolute;">{{Flag|{{{related21}}}<!-- {{#if:{{{related21param|}}}|{{!}}{{{related21param}}}}} -->}}</span>}}<!-- | |||
-->{{#if:{{{related22|}}}| | |||
* [[Template:Country data {{{related22}}}]]<span style="left: 33em; position: absolute;">{{Flag|{{{related22}}}<!-- {{#if:{{{related22param|}}}|{{!}}{{{related22param}}}}} -->}}</span>}}<!-- | |||
-->{{#if:{{{related23|}}}| | |||
* [[Template:Country data {{{related23}}}]]<span style="left: 33em; position: absolute;">{{Flag|{{{related23}}}<!-- {{#if:{{{related23param|}}}|{{!}}{{{related23param}}}}} -->}}</span>}}<!-- | |||
-->{{#if:{{{related24|}}}| | |||
* [[Template:Country data {{{related24}}}]]<span style="left: 33em; position: absolute;">{{Flag|{{{related24}}}<!-- {{#if:{{{related24param|}}}|{{!}}{{{related24param}}}}} -->}}</span>}}<!-- | |||
-->{{#if:{{{related25|}}}| | |||
* [[Template:Country data {{{related25}}}]]<span style="left: 33em; position: absolute;">{{Flag|{{{related25}}}<!-- {{#if:{{{related25param|}}}|{{!}}{{{related25param}}}}} -->}}</span>}}<!-- | |||
-->{{#if:{{{related26|}}}| | |||
* [[Template:Country data {{{related26}}}]]<span style="left: 33em; position: absolute;">{{Flag|{{{related26}}}<!-- {{#if:{{{related26param|}}}|{{!}}{{{related26param}}}}} -->}}</span>}}<!-- | |||
-->{{#if:{{{related27|}}}| | |||
* [[Template:Country data {{{related27}}}]]<span style="left: 33em; position: absolute;">{{Flag|{{{related27}}}<!-- {{#if:{{{related27param|}}}|{{!}}{{{related27param}}}}} -->}}</span>}}<!-- | |||
-->{{#if:{{{related28|}}}| | |||
* [[Template:Country data {{{related28}}}]]<span style="left: 33em; position: absolute;">{{Flag|{{{related28}}}<!-- {{#if:{{{related28param|}}}|{{!}}{{{related28param}}}}} -->}}</span>}}<!-- | |||
-->{{#if:{{{related29|}}}| | |||
* [[Template:Country data {{{related29}}}]]<span style="left: 33em; position: absolute;">{{Flag|{{{related29}}}<!-- {{#if:{{{related29param|}}}|{{!}}{{{related29param}}}}} -->}}</span>}}<!-- | |||
-->{{#if:{{{related30|}}}| | |||
* [[Template:Country data {{{related30}}}]]<span style="left: 33em; position: absolute;">{{Flag|{{{related30}}}<!-- {{#if:{{{related30param|}}}|{{!}}{{{related30param}}}}} -->}}</span>}}<!-- | |||
-->{{#if:{{{related31|}}}| | |||
* [[Template:Country data {{{related31}}}]]<span style="left: 33em; position: absolute;">{{Flag|{{{related31}}}<!-- {{#if:{{{related31param|}}}|{{!}}{{{related31param}}}}} -->}}</span>}}<!-- | |||
-->{{#if:{{{related32|}}}| | |||
* [[Template:Country data {{{related32}}}]]<span style="left: 33em; position: absolute;">{{Flag|{{{related32}}}<!-- {{#if:{{{related32param|}}}|{{!}}{{{related32param}}}}} -->}}</span>}}<!-- | |||
-->{{#if:{{{related33|}}}| | |||
* [[Template:Country data {{{related33}}}]]<span style="left: 33em; position: absolute;">{{Flag|{{{related33}}}<!-- {{#if:{{{related33param|}}}|{{!}}{{{related33param}}}}} -->}}</span>}}<!-- | |||
-->{{#if:{{{related34|}}}| | |||
* [[Template:Country data {{{related34}}}]]<span style="left: 33em; position: absolute;">{{Flag|{{{related34}}}<!-- {{#if:{{{related34param|}}}|{{!}}{{{related34param}}}}} -->}}</span>}}<!-- | |||
-->{{#if:{{{related35|}}}| | |||
* [[Template:Country data {{{related35}}}]]<span style="left: 33em; position: absolute;">{{Flag|{{{related35}}}<!-- {{#if:{{{related35param|}}}|{{!}}{{{related35param}}}}} -->}}</span>}}<!-- | |||
-->{{#if:{{{related36|}}}| | |||
* [[Template:Country data {{{related36}}}]]<span style="left: 33em; position: absolute;">{{Flag|{{{related36}}}<!-- {{#if:{{{related36param|}}}|{{!}}{{{related36param}}}}} -->}}</span>}}<!-- | |||
-->{{#if:{{{related37|}}}| | |||
* [[Template:Country data {{{related37}}}]]<span style="left: 33em; position: absolute;">{{Flag|{{{related37}}}<!-- {{#if:{{{related37param|}}}|{{!}}{{{related37param}}}}} -->}}</span>}}<!-- | |||
-->{{#if:{{{related38|}}}| | |||
* [[Template:Country data {{{related38}}}]]<span style="left: 33em; position: absolute;">{{Flag|{{{related38}}}<!-- {{#if:{{{related38param|}}}|{{!}}{{{related38param}}}}} -->}}</span>}}<!-- | |||
-->{{#if:{{{related39|}}}| | |||
* [[Template:Country data {{{related39}}}]]<span style="left: 33em; position: absolute;">{{Flag|{{{related39}}}<!-- {{#if:{{{related39param|}}}|{{!}}{{{related39param}}}}} -->}}</span>}}<!-- | |||
-->}} | -->}} | ||
{{# | |||
{{#ifeq:{{SUBPAGENAME}}|sandbox||{{#ifexist:{{FULLPAGENAME}}/doc| | |||
{{{{FULLPAGENAME}}/doc | {{#if:{{Suppress categories|{{{{FULLPAGENAME}}/doc}}}}| | ||
=== Other information === | |||
{{#if:{{ | |||
}} | }} | ||
|link box=This is the documentation for '''Template:{{PAGENAME}}'''. It is automatically generated by [[Template:Country showdata]].<br/>Please {{ | {{{{FULLPAGENAME}}/doc|alias={{{alias|}}}|cat={{{cat|}}}}} | ||
}}}} | |||
=== TemplateData === | |||
{{TemplateData header}} | |||
}} | <templatedata>{ | ||
}}</includeonly><noinclude> | "description": "This template should not be used directly. It is used indirectly by flag templates such as Template:Flag and Template:Flagicon. See Category:Flag template system for a full list of flag templates and Wikipedia:WikiProject Flag Template for further documentation.", | ||
{{ | "format": "inline", | ||
</noinclude> | "params": {} | ||
}</templatedata> | |||
{{#ifeq:{{NAMESPACE}}|{{ns:Template}}|<!-- | |||
-->{{#ifeq:{{SUBPAGENAME}}|sandbox|<!-- | |||
-->[[Category:Country data template sandboxes|{{{cat|{{#invoke:String|replace|{{PAGENAME}}|^%w+ data |||false}}}}}]]|<!-- | |||
-->{{#ifexist:{{FULLPAGENAME}}/doc|<!-- | |||
-->[[Category:Country data templates with documentation subpage|{{{cat|{{#invoke:String|replace|{{PAGENAME}}|^%w+ data |||false}}}}}]]|<!-- | |||
-->[[Category:Uncategorized country data templates|{{{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|{{PAGENAME}}|^%w+ data |||false}}}}}]]<!-- | |||
-->}}<!-- | |||
-->[[Category:All country data templates|{{{cat|{{#invoke:String|replace|{{PAGENAME}}|^%w+ data |||false}}}}}]]<!-- | |||
-->{{#if:{{{shortname alias|}}}|<!-- | |||
-->[[Category:Country data templates with distinct shortname|{{{cat|{{#invoke:String|replace|{{PAGENAME}}|^%w+ data |||false}}}}}]]<!-- | |||
-->}}<!-- | |||
-->{{#ifeq:{{PAGENAME}}|Country data {{{alias}}}||<!-- | |||
-->{{#ifeq:{{PAGENAME}}|Country data {{{shortname alias}}}||<!-- | |||
-->[[Category:Country data templates with distinct template name|{{{cat|{{#invoke:String|replace|{{PAGENAME}}|^%w+ data |||false}}}}}]] }}}}<!-- | |||
-->{{#if:{{{flag alias|}}}||[[Category:Country data templates without flag alias|{{#invoke:String|replace|{{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.<!-- | |||
-->{{#ifeq:{{SUBPAGENAME}}|sandbox||{{#ifexist:{{FULLPAGENAME}}/doc|<!-- | |||
--><br />This template has a [[{{FULLPAGENAME}}/doc|/doc]] subpage for the purposes of categories and documentation specific to this template.|<!-- | |||
-->{{#switch:{{PROTECTIONLEVEL:edit}}|sysop|templateeditor=<!-- | |||
--><br />This template is [[Special:ProtectedPages|{{#ifeq:{{PROTECTIONLEVEL:edit}}|sysop|fully protected|template-protected}}]] and any categories should be added to the template's [{{fullurl:{{FULLPAGENAME}}/doc|action=edit&preload=Template:Country_showdata/preload}} /doc] subpage, which is not protected.|#default=<br />Any categories should be added to the template's [{{fullurl:{{FULLPAGENAME}}/doc|action=edit&preload=Template:Country_showdata/preload}} /doc] subpage, which does not exist yet.}}}}}}}}</includeonly><noinclude> | |||
{{Documentation}}</noinclude> |
Latest revision as of 21:37, 22 November 2024
This template is used on approximately 5,300 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 country data templates.
See WikiProject Flag Template on English Wikipedia 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 <!-- Omitted unless Shortcountryname ≠ Countryname. --> | flag alias = Flag of Countryname.svg | size = {{{size|}}} | name = {{{name|}}} | variant = {{{variant|}}} <!-- Omitted unless flag alias-variant parameter(s) are present. --> }}
The first parameter to a country data template is usually the name of a formatting meta-template. For example, {{Flag}}
uses {{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—the documentation is in the template code—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. For example:
|hatnote={{Hatnote|This template contains data that applies to the [[Republic of Ireland|sovereign state]]. For the island of [[Ireland]], see {{Tl|Country data Ireland}}.}}
…which results in…
{{Country data Ireland}}
.See also {{Country data Georgia (country)}}
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|…}}
, {{Flag icon|…}}
, etc. To document these flag variants, use the varN
documentation parameters to identify each label.
For example, {{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.
For example, {{Country data DEU}}
and {{Country data GER}}
both redirect to {{Country data Germany}}
, because DEU is the ISO code and GER is the IOC and FIFA code for Germany. Therefore, {{Flag icon|DEU}}
, {{Flag icon|GER}}
, and {{Flag icon|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, {{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
<noinclude>...</noinclude>
template {{Documentation}}
in the main country data template.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.
For example:
{{Country data Ireland/doc}}
is used to explain why that template is distinct from{{Country data Republic of Ireland}}
{{Country data France/doc}}
is used to document the list of country data templates available for each of the regions of France{{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
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, {{Country data Åland Islands}}
and {{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 (1,095)
- Category:Country data templates with distinct default size (15)
- Category:Country data templates with distinct shortname (295)
- Category:Country data templates with distinct template name (59)
- Category:Country data templates with documentation subpage (315)
- Category:Country data templates without flag alias (6)
- Category:Uncategorized country data templates (781)
Manually added to templates or documentation pages: