Difference between revisions of "Template:Flagright/doc"

From blackwiki
Jump to navigation Jump to search
imported>SiBr4
(Created page with '{{documentation subpage}} This template works like the {{tl|Flagcountry}} template, but displays the flag on the right side of the country name. The template c...')
 
imported>Zyxw
(prevent sandbox from being included in category)
 
(3 intermediate revisions by one other user not shown)
Line 1: Line 1:
 
{{documentation subpage}}
 
{{documentation subpage}}
  
This template works like the {{tl|Flagcountry}} template, but displays the flag on the right side of the country name.
+
This template works like the {{tl|flag}} template, but displays the flag to the right of the country name.
  
The template can display every country/territory with a "Country data ..." template, and abbreviations are also possible:
+
The template can display every country/territory with a [[:Category:Country data templates|"Country data ..." template]], and abbreviations are also possible:
  
 
{| class="wikitable"
 
{| class="wikitable"
 
! style="text-align: center;" | Wikicode
 
! style="text-align: center;" | Wikicode
 
! style="text-align: center;" | Result
 
! style="text-align: center;" | Result
 +
! width="500" | Notes
 
|-
 
|-
 
| <nowiki>{{flagright|India}}</nowiki>
 
| <nowiki>{{flagright|India}}</nowiki>
 
| style="text-align: right;" | {{flagright|India}}
 
| style="text-align: right;" | {{flagright|India}}
|-
+
| Uses {{tl|Country data India}} to know which flag to use and which article to link to.
| <nowiki>{{flagright|GUY}}</nowiki>
 
| style="text-align: right;" | {{flagright|GUY}}
 
 
|-
 
|-
 
| <nowiki>{{flagright|USSR}}</nowiki>
 
| <nowiki>{{flagright|USSR}}</nowiki>
 
| style="text-align: right;" | {{flagright|USSR}}
 
| style="text-align: right;" | {{flagright|USSR}}
 +
| Uses {{tl|Country data USSR}}, which redirects to {{tl|Country data Soviet Union}}.
 
|-
 
|-
| <nowiki>{{flagright|Bermuda}}</nowiki>
+
| <nowiki>{{flagright|GUY}}</nowiki>
| style="text-align: right;" | {{flagright|Bermuda}}
+
| style="text-align: right;" | {{flagright|GUY}}
 +
| Uses {{tl|Country data GUY}}, which redirects to {{tl|Country data Guyana}}.<br/>Note: To display "Guyana" rather than "GUY", the parameter {{para|name}} can be used (see Côte d'Ivoire example below). Or just use <nowiki>{{flagright|Guyana}}</nowiki>.
 
|}
 
|}
  
Other parameters:
+
Other parameters include:
  
 
{| class="wikitable"
 
{| class="wikitable"
 
! style="text-align: center;" | Wikicode
 
! style="text-align: center;" | Wikicode
 
! style="text-align: center;" | Result
 
! style="text-align: center;" | Result
 +
! width="600" | Notes
 
|-
 
|-
 
| <nowiki>{{flagright|Myanmar|variant=1974}}</nowiki>
 
| <nowiki>{{flagright|Myanmar|variant=1974}}</nowiki>
 
| style="text-align: right;" | {{flagright|Myanmar|variant=1974}}
 
| style="text-align: right;" | {{flagright|Myanmar|variant=1974}}
 +
| rowspan="2" | The "variant" parameter and second unnamed parameter (they function identically) can be used to display a historical or alternative flag. Possible variants are listed on each country's respective country data template (in these examples {{tl|Country data Myanmar}} and {{tl|Country data Australia}}).
 
|-
 
|-
| <nowiki>{{flagright|Australia|variant=naval}}</nowiki>
+
| <nowiki>{{flagright|Australia|naval}}</nowiki>
| style="text-align: right;" | {{flagright|Australia|variant=naval}}
+
| style="text-align: right;" | {{flagright|Australia|naval}}
 
|-
 
|-
 
| <nowiki>{{flagright|France|size=40px}}</nowiki>
 
| <nowiki>{{flagright|France|size=40px}}</nowiki>
 
| style="text-align: right;" | {{flagright|France|size=40px}}
 
| style="text-align: right;" | {{flagright|France|size=40px}}
 +
| The "size" parameter changes the size of the flag icon (in this example, its width is specified). Default size for flag icons is 23x15px (no more than 23px wide, no more than 15px high), though some entities have a different default size specified in their respective country data template.
 
|-
 
|-
| <nowiki>{{flagright|Côte d'Ivoire|name=Ivory Coast}}</nowiki>
+
| <nowiki>{{flagright|Ivory Coast|name=Côte d'Ivoire}}</nowiki>
| style="text-align: right;" | {{flagright|Côte d'Ivoire|name=Ivory Coast}}
+
| style="text-align: right;" | {{flagright|Ivory Coast|name=Côte d'Ivoire}}
 +
| The "name" parameter changes the default displayed name (in this case "Ivory Coast") to the specified name, while linking to the same article.
 
|}
 
|}
  
<includeonly>
+
<includeonly>{{Sandbox other||
 
[[Category:Flag template system]]
 
[[Category:Flag template system]]
</includeonly>
+
 
 +
}}</includeonly>

Latest revision as of 00:20, 17 December 2018

This template works like the {{flag}} template, but displays the flag to the right of the country name.

The template can display every country/territory with a "Country data ..." template, and abbreviations are also possible:

Wikicode Result Notes
{{flagright|India}} India 23x15px Uses {{Country data India}} to know which flag to use and which article to link to.
{{flagright|USSR}} Soviet Union  Uses {{Country data USSR}}, which redirects to {{Country data Soviet Union}}.
{{flagright|GUY}} GUY 23x15px Uses {{Country data GUY}}, which redirects to {{Country data Guyana}}.
Note: To display "Guyana" rather than "GUY", the parameter |name= can be used (see Côte d'Ivoire example below). Or just use {{flagright|Guyana}}.

Other parameters include:

Wikicode Result Notes
{{flagright|Myanmar|variant=1974}} Myanmar 23x15px The "variant" parameter and second unnamed parameter (they function identically) can be used to display a historical or alternative flag. Possible variants are listed on each country's respective country data template (in these examples {{Country data Myanmar}} and {{Country data Australia}}).
{{flagright|Australia|naval}} Australia 23x15px
{{flagright|France|size=40px}} France File:Flag of France.svg The "size" parameter changes the size of the flag icon (in this example, its width is specified). Default size for flag icons is 23x15px (no more than 23px wide, no more than 15px high), though some entities have a different default size specified in their respective country data template.
{{flagright|Ivory Coast|name=Côte d'Ivoire}} Côte d'Ivoire  The "name" parameter changes the default displayed name (in this case "Ivory Coast") to the specified name, while linking to the same article.