Wikipedia:WikiProject Flag Template

From Freepedia

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

Contents

Country templates

The {{country|Action|CountryName}} template is used to display various information about a country.

  • Shortcuts:
    • {{flagcountry}}: {{flagcountry|CountryName}}: Same as country|flagcountry.
    • {{flag}}: {{flag|CountryName}}: Flag icon with text linked to country page. (implemented with country|flag)
    • {{flagicon}}: {{flagicon|CountryName}}: Same as country|flagicon.
    • {{flagIOC}}: {{ISO|CountryName}}: Same as country|flagIOC.
    • {{ISO|flag}}: {{ISO|flag|CountryName}}: Same as country|flagISO.
    • {{ISO|code}}: {{ISO|code|CountryName}}: Produces ISO code: {{ISO|code|United States}}: USA
  • country|name: {{country|name|CountryName}}: United States — Name of country with link to article.
  • country|flag: {{country|flag|CountryName}}: Flag icon with text linked to country page.
    • Each CountryName is connected to a flag file, a Wikipedia article name, and text label. The flag file and text label are displayed, with a link to the Wikipedia article.
  • country|flagcountry: {{country|flagcountry|CountryName}}: Flag icon with short name of country linked to article.
  • country|flagicon: {{country|flagicon|CountryName}}: Flag icon alone.
  • country|flagISO: {{country|flagISO|CountryName}}: Flag icon with text linked to country page; name is an ISO 3166-1 country code.
  • country|flagIOC: {{country|flagIOC|CountryName}}: Flag icon with text linked to country's Olympics page; name is an International Olympic Committee country code (see List of IOC country codes).
    • IOC country code usage:
      1. An IOC country code should be used only for general reference to that country's Olympic activities.
        • At present an IOC country code will create a link to that nation's recent Olympics page, as there is no Olympics page for each country.
      2. Names such as flagIOC-2000 should be used for Games which have detailed coverage. This ensures that links will point to specific Games despite future changes.
      3. Use modified country codes such as RUS-SFSR for historical references to Games where a country's reference has changed (ie, different flag).

Template:Flag

  • Implemented by invoking {{country|flag|CountryName}}.
    • Uses sub-templates to alias various names for a country to a specific name.
      • At present, all supported countries must have sub-templates. Need better incantation or create templates.
        • A couple of hundred countries have to be supported, plus aliases.
        • Two/three letter abbreviations for each.
        • Some countries have aliases: US, USA, United States, United States of America.
    • Displays aliased Image file name.
    • Displays aliased text label (ie, "US" is aliased to "USA").
    • Links label to Wikipedia article (ie, "US" is linked to United States)

Examples:

Editing flag description

{{countryedit|CountryName|IOC abbreviation}}: Displays a table with links to the fields which are used by {{country}} and {{flag}} templates.

Example of {{countryedit|USA|USA|USA}}:

Name: "USA" ISO: "USA" IOC: "USA"
Item Usage Content Edit Description
Flag Image:Flag of the United States.svg Flag of the United States.svg Edit Image of flag
Article United States United States Edit Article name
Label USA USA Edit Short label (ie, ISO abbrev.)
Common name United States United States Edit Common short name
ISO country code usage
Code:Country USA USA Edit ISO country code for USA
Code:ISO USA USA Edit ISO country code for USA
Flag Image:Flag of the United States.svg Flag of the United States.svg Edit Flag image for {{ISO|flag|ISOabbrev}}
Article United States United States Edit Article name for {{ISO|flag|ISOabbrev}}
Olympic Games usage
Flag Image:Flag of the United States.svg Flag of the United States.svg Edit IOC flag image
Article Image:Flag of the United States.svg USA United States Edit Article name for IOC use

For a country without an ISO code or IOC code use an empty parameter (nothing after the | symbol. An ISO country code may be displayed from a lookup table.
{{countryedit|USA||}}:

Name: "USA" ISO: "" IOC: ""
Item Usage Content Edit Description
Flag Image:Flag of the United States.svg Flag of the United States.svg Edit Image of flag
Article United States United States Edit Article name
Label USA USA Edit Short label (ie, ISO abbrev.)
Common name United States United States Edit Common short name
ISO country code usage
Code:Country USA USA Edit ISO country code for USA
Code:ISO none none Edit ISO country code for
Flag Image:Blank.JPG Blank.JPG Edit Flag image for {{ISO|flag|ISOabbrev}}
Article none none Edit Article name for {{ISO|flag|ISOabbrev}}
Olympic Games usage
Flag Image:Blank.JPG Blank.JPG Edit IOC flag image
Article Image:Blank.JPG [[none at the 2004 Summer Olympics|]] none Edit Article name for IOC use

Implementation

The technology being used is called a template array: a group of templates whose names follow patterns which are used to address them. For example, the common programming array address A(1,2) can be represented as Template:array_A_1_2.

Defined template array entries appear in this list: templates starting with country_

Template arrays for these templates follow the convention: country_AliasType_alias_CountryName

  • country_: prefix used by templates related to {{country}}.
  • AliasType: optional indicator of type of alias.
  • _alias_: suffix to indicate end of alias type.
  • CountryName: name of country which is being addressed.
    • CountryName-Modifier is also used, for historical or component references, such as Russian-SFSR to refer to Russia while a member of the USSR, or US-WI to refer to the US state of Wisconsin.

Aliasing example

Referenced as Template addressed Value in template Usage
US country_alias_US United States Wikipedia article: United States
US country_flag_alias_US Flag of the United States.png Flag: Image:Flag of the United States.svg
US country_label_alias_US USA Small text label: Image:Flag of the United States.svg USA
US country_shortname_alias_US United States Short country name: Image:Flag of the United States.svg United States

Flag creation guidelines

Format

  • 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

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

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.

Country information definition

Including the countryedit template on the flag's page helps ensure the proper information is defined.

Finding flag images

Places to find flags:

Future development

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

Archives

/Archive1: Archive of project when testing of flag template was completed. June 23 2005



Views
Personal tools
Similar Links