Jump to content

വിക്കിപീഡിയ:വിക്കി പ്രോജക്റ്റ് ഫ്ലാഗ് ടെമ്പ്ലേറ്റ്

വിക്കിപീഡിയ, ഒരു സ്വതന്ത്ര വിജ്ഞാനകോശം.

പ്രധാന ഫലകങ്ങൾ[തിരുത്തുക]

Template:Flagicon[തിരുത്തുക]

Produces a small image of the named flag. The image has a link to the article associated with the flag.

Example:{{flagicon|Japan}}ജപ്പാൻ

Template:Flag[തിരുത്തുക]

Produces a small image of the named flag, plus a wikilink to the associated article. The icon image does not have a link (unlikeflagicon) so thatscreen readersdo not render the name twice.

Example:{{flag|United Kingdom}}United Kingdom

Template:Flagu[തിരുത്തുക]

Similar toflag,but the associated country name is unlinked. This template should be used in articles withWP:OVERLINKconcerns (e.g. when the same flag is used many times in a single table).

Example:{{flagu|United States}}United States

Template:Flagcountry[തിരുത്തുക]

Similar toflag,but always uses the preferred display text for the wikilinked article. Useful when the input parameter can be a country code, or is a long-form country name because it links to a different article, such as for a historical country.

Examples:{{flagcountry|Kingdom of Italy}}Italy
{{flagcountry|BRA}}ബ്രസീൽ

Template:Flagdeco[തിരുത്തുക]

Displays a flag of the named parameter in "icon" size, currently 22x20 pixels plus a one pixel border. This template is very similar toTemplate:Flagicon,except the image is not linked to an article, i.e. it is "purely decorative" perWorld Wide Web Consortium(W3C)Web Content Accessibility Guidelines(WCAG). This template can be used when the article text immediately adjacent to the icon provides the associated link for the flag.

Comparison example
Usage examples

"കുറുക്കുവഴി" ഫ്ലാഗ് ഫലകങ്ങൾflag templates[തിരുത്തുക]

Many countries also have individual flag templates, named using standard three letter country codes so as to offer "shortcut" alternatives to the standard templates. This is a mixed blessing; some country codes (like "USA" ) are widely known and the corresponding shortcut templates (i.e.{{USA}}) offer convenience, but some country codes are relatively obscure, so wiki markup would likely be clearer if the country names were spelled out in full. Also, the shortcut templates do not offer the ability to use historical flag variants (described below), and are therefore less flexible.

Example:{{BEL}}ബെൽജിയം(equivalent to{{flag|Belgium}})

SeeWikipedia:Inline templates linking country articlesfor a complete list.

ഫ്ലാഗുകളുടെ പേരുകൾ[തിരുത്തുക]

The first (positional) parameter for these templates specifies the country (or other entity) to be used for the flag image. These actually identifyadditionaltemplates that individually store information specific to that country. For example, the image name and main article name used by{{flag|Norway}}(to produceNorway) is stored inTemplate:Country data Norway.The complete set of these "country data" templates is found inCategory:Country data templates.

Note that there are country data templates for many entities that are not consideredcountries,such as international organizations or sub-national entities. The use of "country" in these template names is only because the original implementation of the flag template system was built uponTemplate:CountryA better name might have been "flag data", but it is likely too late for that change now.

Some examples of non-country flag templates are:


Many country data templates also exist for historical nations, and these can be used to produce the historical flags with wikilinks to the appropriate articles. Some examples are:

മറ്റ് അറിയപ്പെടുന്ന പേരുകൾ[തിരുത്തുക]

For added convenience, many flags can be identified by analias name,typically a three-letter country code. For example, instead of{{flagicon|France}},you could simply use{{flagicon|FRA}}to produceഫ്രാൻസ്.

Alias names are available for almost every nation listed inISO 3166-1 Alpha -3,thelist of IOC country codes,and thelist of FIFA country codes.For example,{{flagicon|DEU}}(ISO) and{{flagicon|GER}}(IOC and FIFA) both produceജെർമനി.A small handful of other well-known abbreviations are also available (such asUK,EU,andUSSR).

Alias names are implemented as redirects in the template namespace. For example,Template:Country data VENis a redirect toTemplate:Country data Venezuela.The complete set of these redirects is listed inCategory:Country data redirects,and the available alias redirect(s) for a given country data template (if any) are also documented on that template's page.

Please do not create redirect aliases with uncommon abbreviations, especially for countries or regions that do not have standard country codes. Wikicode is much easier to read if the full name is used. Even some of the standard country codes are not widely known!

When using country code aliases, templateflagwill display this value for the wikilink's display text. For example:

  • {{flag|USA}}USA
  • {{flag|UK}}UK
  • {{flag|CHN}}CHN

Note that in each case, the target wikilink points to the correct article name (i.e.United States,United Kingdom,andPeople's Republic of China,respectively) but the display text matches the input parameter to templateflag.This may be the desired effect, such as in column headings of a large table, but if the full name is wanted, then useTemplate:Flagcountryinstead:

Alias names have a second purpose, which is to provide alternative display text for target wikilinks. For example, the main article linked byTemplate:Country data East GermanyisEast Germany,butTemplate:Country data German Democratic Republicis a redirect alias. Therefore, you can use{{flag|German Democratic Republic}}forGerman Democratic Republic.Again, note that the target article name for the generated wikilink is stillEast Germany.

ഫ്ലാഗുകളുടെ വിവിധരൂപങ്ങൾ[തിരുത്തുക]

Many countries have had different flag variations at various periods in their history. The flag template system can accommodate this by storing multiple flag variants inside country data templates. A specific flag variant is selected by specifying an additional parameter to any of the standard flag templates. This parameter is usually given as the second positional parameter to the template, but may also be given as thevariantnamed parameter.

Examples
  • {{flag|Germany|empire}}Germany
  • {{flag|Germany|variant=empire}}Germany
  • {{flagcountry|CAN|1921}}കാനഡ
  • {{flagicon|CAN|1921}}കാനഡ

The set of available flag variants (if any) for a specific country data template are documented on the country data template page itself. Each variant is identified by a short text label, such asempireor1921in the examples above. Usually, the label identifies the year in which the flag was introduced, but this is not a mandatory style convention.

Do not change the name of an existing flag variant label unless you are absolutely certain it is not in use. These labels are not like article names, where redirects are created when an article is renamed. Changing a flag variant label will instantly break any current usage of that label.

മറ്റു പ്രധാന വിശദാംശങ്ങൾ[തിരുത്തുക]

വലിപ്പം[തിരുത്തുക]

The default size for all flag icons created by these templates is 22x20px, with a one pixel border. That is, the icon will be no more than 22 pixels wide, and no more than 20 pixels tall. Most flags have a horizontal orientation, so the 22 pixel width is usually the limiting dimension. These dimensions were carefully chosen to generate the best results when flagicons are used in a bulleted list with the default browser text size.

In certain situations, it might be desirable to use a larger (or smaller) size, and this is enabled with thesizenamed parameter, available with all standard templates.

Examples
  • {{flag|MON|size=100px}}MON
  • {{flagicon|Netherlands|size=40px}}നെതർലൻഡ്സ്
  • <small>{{flag|Belgium|size=15px}}</small>Belgium

പേര്[തിരുത്തുക]

The display text of the target wikilink is usually automatically generated, but can always be over-ridden with thenameparameter.

Examples
  • {{flag|South Korea|name=Korea}}Korea(this name is used in several sports)
  • {{flag|ROC|name=China}}China(China from 1912 to 1949)


മറ്റു ഫ്ലാഗ് ഫലകങ്ങൾ[തിരുത്തുക]

Template:Flaglink[തിരുത്തുക]

Similar toflagcountry,but extends the wikilink by adding a suffix after the country name. This is useful when a series of per-country articles exist for a main topic.

Examples

Template:Navy[തിരുത്തുക]

Displays the naval ensign of the named country (identified as thenavalvariant in the corresponding country data template) plus a wikilink to the main article for the country's navy. Note that the naval ensign for many countries is the same as the national flag. Also note that theWP:SHIPSandWP:MILHISTconventions are to use naval ensigns, not naval jacks when identifying ships with flag icons.

Examples

ദേശീയ കായിക ടീമുകളുടെ ഫ്ലാഗ് അടങ്ങിയ ഫലകങ്ങൾ[തിരുത്തുക]

One of the most common instances of flag icon usage on Wikipedia is for national sport teams. Several sets of sport-specific templates have been developed to also use this flag template system:

These templates have intentionally been given terse names because they tend to be used many, many times on individual pages for match results. They completely supersede a set of previously used national team-specific templates. For example,{{fb|ITA}}replaced{{ITAf}},{{ru|NZL}}replaced{{NZLru}},etc.

There are often several template variations available for a given sport:

  • with a "w" suffix, links to women's national team articles instead
  • with a "-rt" suffix, renders the flag icon to the right of the nation's name instead of to the left. This formatting style is often used in match results
  • with a -big "suffix, renders the flag icon in larger size and the team name underneath the flag. This formatting style is often used in tables of tournament results.

For example, for football, the following templates are used:

Team Standard Right flag Big flag
Men's national teams {{fb}} {{fb-rt}} {{fb-big}}
Examples സ്പെയ്ൻ നെതർലൻഡ്സ്
ജെർമനി
Women's national teams {{fbw}} {{fbw-rt}} {{fbw-big}}
Examples സ്പെയ്ൻ നെതർലൻഡ്സ്
ജെർമനി

ഫ്ലാഗ് ഐക്കണുകൾ കാണിക്കുന്നത് ഉപയോക്താക്കൾക്ക് തിരഞ്ഞെടുക്കാനുള്ള രീതി[തിരുത്തുക]

Users that do not like flag icons can disable them with a preference setting. A CSS class is used within the internal formatting template, and the class setting can be changed from a user's personalmonobook.cssfile.

Flag icon image rendering is disabled by:

.flagicon { display: none; }

പ്രവൃത്തിപഥത്തിൽ കൊണ്ടുവരൽ[തിരുത്തുക]

Three types of templates are used by the flag template system, each with a different function:

  1. User-transcluded templates
  2. Country data templates (internal)
  3. Formatting templates (internal)

For example,{{flag|Spain}},uses:

  1. Template:Flag,to accept input parameters, such as the country name (mandatory) and the optional flag variant, size, and wikilink display name.
  2. Template:Country data Spain,to supply the image name and article name
  3. Template:Flag/core,to actually render the image icon and wikilink

This system architecture means that:

  • all country-specific data is contained within individual country data templates, improving maintainability
  • the formatting wikicode is centralized in a very small number of templates, ensuring consistency

എങ്ങനെയാണ് പ്രവർത്തിക്കുന്നത് എന്നത്[തിരുത്തുക]

There are three steps in each flag template invocation. In the previous example of{{flag|Spain}},the templates expand as follows:

First,Template:Flagexpands to invokeTemplate:Country data Spain,and ensure that all user-specified parameters are set. The first parameter to the country data template is actually thename of the formatting template.This is the mechanism by which the same country data template can be used with multiple different formatting templates. Therefore, the first step of expansion results in:

{{country data Spain | flag/core | variant = | size = | name = Spain}}

If thevariant(or second positional parameter), thesize,and/ornameparameters were specified in the user invocation, these would be set to the desired value. For example,{{flag|Spain|1939|name=España}}would expand to:

{{country data Spain | flag/core | variant = 1939 | size = | name = España}}

Next, the country data template expands to invoke the formatting template, plus add all the country-specific parameters. Going back to the simpler example of{{flag|Spain}},the second expansion results in:

{{flag/core | alias = Spain | flag alias = Flag of Spain.svg | name = Spain}}

Lastly, the formatting template is expanded to produce:

<span class= "flagicon" >[[File:Flag of Spain.svg|22x20px|border |alt=|link=]] </span>[[Spain]]

രാജ്യങ്ങളുടെ വിവരങ്ങൾക്കുള്ള ഫലകത്തിന്റെ രൂപം[തിരുത്തുക]

The structure of all country data templates follows a standard pattern, which is extended to include additional parameters only when necessary. The empty boilerplate for all country data templates is as follows:

{{ {{{1<noinclude>|country showdata</noinclude>}}}
| alias =
| flag alias =
| size = {{{size|}}}
| name = {{{name|}}}
}}

There are two essential values that must be specified:

  1. Thealiasvalue identifies the name of the main article associated with the flag.
  2. Theflag aliasvalue identifies the image name of the default flag.

The invocation ofcountry showdataon the first line is used to automatically generate the template documentation, as described below. Thesize = {{{size|}}}andname = {{{name|}}}statements ensure that any user-specified size and/or name values are passed through from theoutertemplate (flag,flagicon,etc.) to theinnerformatting template. Omission of these lines from the country data template would cause the size and name functionality to be disabled.

ഫ്ലാഗുകളുടെ വ്യത്യസ്തരൂപങ്ങൾ ചേർക്കുന്നത്[തിരുത്തുക]

Additional flag variants are specified by individualflag aliasstatements. The unique label for the variant is the suffix of the parameter name, asflag alias-label(don't forget the hyphen). For example,Template:Country data Mexicohas several flag variants, one of which is specified by:

| flag alias-1934 = Flag of Mexico (1934-1968).png

Therefore, when{{flag|Mexico|1934}}is transcluded,Image:Flag of Mexico (1934-1968).pngis rendered. The selection of the flag variant is coded in the formatting templates.

Country data templates with at least one flag variant (in addition to the default)mustalso have the following line:

| variant = {{{variant|}}}

Similar to thesizeandnameparameters as described above, this statement is required to pass the variant value (e.g.1934) from theouterflag template to theinnerformatting template. Omission of this line will cause the flag variant selection to fail.

വിക്കിലിങ്ക് പ്രദർശിപ്പിക്കുന്ന എഴുത്ത് മാറ്റുന്നത്[തിരുത്തുക]

The best results are obtained when the template name matches the article wikilink (as specified by thealiasvalue). For example,Template:Country data Russiacontainsalias = Russia,which results in a target wikilink toRussia.

However, there are instances where the main article name contains a disambiguation string. For example,Template:Country data Georgiacontainsalias = Georgia (country).Therefore,{{flag|Georgia}}results inGeorgia.Note that the wikilink isGeorgia (country),but the display string is "Georgia", as expected.

In these instances, an additional statement is needed to supportTemplate:Flagcountryproperly. Theshortname aliasparameter should be set to the desired text string, such asshortname alias = Georgia.In effect, the resultant wikilink will be generated as[[alias|shortname alias]],or[[Georgia (country)|Georgia]]in this specific example.

ലിങ്ക് ചെയ്യുന്ന താൾ മാറ്റൽ[തിരുത്തുക]

To link to a topic-specific page, follow the template with a wikilink. For example, to link to the education system in a table comparing different countries' educational outcomes, you could use

{{flagicon|Finland}} [[Education in Finland|Finland]]

which would look like this:ഫിൻലൻഡ്Finland.

ദേശീയ കായിക ടീമുകളുടെ ടെമ്പ്ലേറ്റുകളുടെ വിശദാംശങ്ങൾ[തിരുത്തുക]

Any country data template that will be used with a national team template must include an additional "pass-through" parameter:

| altlink = {{{altlink|}}}

This parameter is used to form the suffix of the associated wikilink. For example,Template:crappends "national cricket team" to the country name (aliasvalue), and this process is enabled by thealtlinkparameter.

In most cases, the flag and display name for national teams corresponds to the same flag and display name normally used for the nation. However, in some instances these can be over-ridden by additional parameters within the country data template. The default wikilink can also be changed in cases where the common naming convention is not used.

Some examples:

In each of these examples, the over-ride parameter (name alias-football,flag alias-field hockey,orlink alias-netball) is identified by a unique per-sport variable that is passed from the appropriate sport team template. For example,Template:fbincludesaltvar = football.Therefore, any country data template that utilizes one or more team sport over-ride parameters must also include:

| altvar = {{{altvar|}}}

ടെമ്പ്ലേറ്റ് ഡോക്യുമെന്റേഷൻ[തിരുത്തുക]

Country data templates "self-document" themselves throughTemplate:Country showdata.Recall that the first line of each country data template is an invocation to a formatting template, defaulting tocountry showdataif that parameter is missing:


For simple country data templates, nothing further needs to be done to document them. If any flag variants, redirect aliases, etc. are used with the template, they are documented by adding parameters specifically for use bycountry showdata.These extra parameters are enclosed in a<noinclude>....</noinclude>section as they should not be present for any other invocation of the country data template.

SeeTemplate:Country showdata/docfor more information about how to document country data templates.

ഇതും കാണുക[തിരുത്തുക]

  • {{Coat of arms}}for coats of arms in infoboxes and lists
  • {{flagIOC}}for a similar template used exclusively for Olympic Games related articles, and uses a different internal mechanism than for these templates.
  • {{Shipboxflag}}for display of flags in ship infoboxes

ആഭ്യന്തരപദ്ധതികളുടെ ടെമ്പ്ലേറ്റുകൾ[തിരുത്തുക]

ആർകാഇവുകൾ[തിരുത്തുക]