Wikipedia:WikiProject Flag Template

Daripada Wikipedia, ensiklopedia bebas.
Lompat ke: pandu arah, cari
Jalan pintas:

Templates for displaying a tiny flag image or other country information.

Policy[sunting | sunting sumber]

Wikipedia:Flag

Available templates[sunting | sunting sumber]

{{flagicon|United Kingdom}} → United Kingdom Displays the flag alone
{{flagcountry|United Kingdom}} → Bendera United Kingdom United Kingdom Displays the flag with a link to the main article of the country
{{flag|United Kingdom}} →  United Kingdom Displays flag with full name of country
{{flag|GBR}} →  GBR Displays flag with abbreviation

Also see {{flagIOC}} for a similar template used exclusively for Olympic Games related articles, and uses a different internal mechanism than for these templates.

Aliases for country names are available:

Optional parameters:

  • parameter 3 — to use different version of the flag image
  • name — to produce a non-default link-text
  • size — to use a non-default flag size
    • {{flagicon|United Kingdom|size=40px}} → United Kingdom
    • {{flagcountry|United Kingdom|size=40px}} → Bendera United Kingdom United Kingdom

Implementation[sunting | sunting sumber]

The data what to display is contained in country data templates, with a template per country. See category:country data templates for an overview of available countries.

The logic how to display these is contained in formatter templates.

Template Formatter used
{{flagicon}} {{country flagicon2}}
{{flagcountry}} {{country flagcountry2}}

As an example, let's dissect the call {{flagcountry|United Kingdom}} (which produces Bendera United Kingdom United Kingdom):

(1) {{flagcountry|United Kingdom}} expands to: {{country data United Kingdom | country flagcountry2 }}
(2) expands to: {{country flagcountry2 | alias = United Kingdom of Great Britain and Northern Ireland | shortname alias = Great Britain | label alias = GBR | flag alias = Flag of United Kingdom.svg}}
(3) expands to: [[Image:Flag of United Kingdom.svg|22x20px|Flag of United Kingdom]] [[United Kingdom]]

Aliases for country names are created by using redirects: For example, template:country data GBR is a redirect to template:country data United Kingdom.

Flag creation guidelines[sunting | sunting sumber]

Format[sunting | sunting sumber]

  • Format: Use SVG format. It is preferred for drawings and iconic images. Images should be properly prepared for upload.
  • Size: Use a size large enough to contain all the detail. It is easily shrunk to a desired size.

License[sunting | sunting sumber]

License: Use the appropriate license message from Image copyright tags. The summary below is a selection from the full list.

  • {{PD}} - for when author has put into the public domain or the author died over 70 years ago (pre-1935). Consider first using the following subtags:
    • {{PD-flag-US}} - for images of national, governmental, or historical flags out of copyright in the United States
    • {{PD-flag-50}} - for images of national, governmental, or historical flags out of copyright in those countries with copyright terms of life of the author plus 50 years
    • {{PD-flag-70}} - for images of national, governmental, or historical flags out of copyright in those countries with copyright terms of life of the author plus 70 years
    • {{PD-flag-100}} - for images of national, governmental, or historical flags out of copyright in those countries with copyright terms of life of the author plus 100 years
  • Messages used with flags which are not properly identified:
    • {{PD-flag}} - images of flags marked as public domain when in fact they might not be. Source information is often needed and licence information should be added if necessary.

Commons[sunting | sunting sumber]

It is not currently possible to use an image uploaded to one Wikimedia project in another one without re-uploading it. If you want to use the same image in more than one project, you can upload it to Wikimedia Commons and it would become immediately accessible from all Wikimedia projects. Note that Commons only accepts free images (public domain or licensed under a free license). If the image is fair use, you can't upload it to Commons. To upload the image existing on Wikipedia to another project you will need to download the image to your own computer (often right clicking on it will give you this option), and then re-upload that to the place you want the image to be copied to. Interlanguage links can be added between the two.

Finding flag images[sunting | sunting sumber]

Places to find flags:

Future development[sunting | sunting sumber]

I am using the template array technology. There are proposed technologies which may be better. (SEWilco 05:46, 9 Jun 2005 (UTC))

Internal project templates[sunting | sunting sumber]

Archives[sunting | sunting sumber]