مندرجات کا رخ کریں

سانچہ:Flagg

آزاد دائرۃ المعارف، ویکیپیڈیا سے

لوا خطا ماڈیول:Flagg میں 77 سطر پر: attempt to call field 'getcachedtable' (a nil value)۔

{{Flagg}} (flag general) is a flag template with variable output format. Using Lua instead of the standard mechanism, it allows overriding the image name and link target, and works even if a country data template for an entity does not exist (without using any expensive functions).

The template is not intended to fully supersede any specific flag templates it can simulate (see below), but can be useful for formats for which no template exists, or if its additional options are needed. It can also be used in conjunction with Module:Flag to reduce post-expand include size of pages with lots of templates.

Parameters

[ترمیم]

Aliases (alternatives) for each parameter or value are given in square brackets.

Format (first unnamed parameter)

[ترمیم]

The first parameter is an alphabetic code specifying the output format. The first letter concerns the image, the second the separator, and the third the country name. The parameter is fully case-insensitive.

If any position in the parameter value is missing or has a character not corresponding to an option below, the options marked as default will be used; e.g. a first parameter equal to i, i** or izz will be read as isc.

First letter: Image

[ترمیم]
LetterMeaningDescriptionExample
uunlinkedImage is not linked (default).{{flagg|uxx|France}} نتیجہ: لوا خطا ماڈیول:Flagg میں 77 سطر پر: attempt to call field 'getcachedtable' (a nil value)۔
ccountryImage links to country/entity page.{{flagg|cxx|France}} نتیجہ: لوا خطا ماڈیول:Flagg میں 77 سطر پر: attempt to call field 'getcachedtable' (a nil value)۔
p [f]prefix/suffixImage links to country name with prefixed and/or suffixed text (default "Flag of ..."), set using |pref= and |suff= (see below).{{flagg|pxx|France}} نتیجہ: لوا خطا ماڈیول:Flagg میں 77 سطر پر: attempt to call field 'getcachedtable' (a nil value)۔
iimage pageImage links to file description page; use this for non-public-domain images, for which attribution is required.{{flagg|ixx|France}} نتیجہ: لوا خطا ماڈیول:Flagg میں 77 سطر پر: attempt to call field 'getcachedtable' (a nil value)۔
ddata templateImage links to the used country data template, for use in discussion/documentation. Automatically adds redirect=no if link is a redirect.{{flagg|dxx|France}} نتیجہ: لوا خطا ماڈیول:Flagg میں 77 سطر پر: attempt to call field 'getcachedtable' (a nil value)۔
xX markNo image is displayed. If the second letter is anything other than x, and o is not set, an unlinked transparent image is actually used to preserve the spacing.{{flagg|xnx|France}} نتیجہ: لوا خطا ماڈیول:Flagg میں 77 سطر پر: attempt to call field 'getcachedtable' (a nil value)۔

Second letter: Separator

[ترمیم]
LetterMeaningDescriptionExample
sspan boxThe flag image is put in a fixed-width <span> tag, meaning the country names are aligned in vertical lists; see documentation of {{Flaglist}} (default).{{flagg|usu|Niger}} نتیجہ: لوا خطا ماڈیول:Flagg میں 77 سطر پر: attempt to call field 'getcachedtable' (a nil value)۔
nnon-breaking spaceA non-breaking space (&nbsp;) is used, like in most flag templates, including {{flag}}. Note that &nbsp; does not actually prevent wrapping between image and text in all browsers; use w as described below if needed.{{flagg|unu|Niger}} نتیجہ: لوا خطا ماڈیول:Flagg میں 77 سطر پر: attempt to call field 'getcachedtable' (a nil value)۔
lline breakA line break (<br/>) is used as separator.{{flagg|ulu|Niger}} نتیجہ: لوا خطا ماڈیول:Flagg میں 77 سطر پر: attempt to call field 'getcachedtable' (a nil value)۔
ttable cellA table cell separator (two pipes) is used.{{flagg|utu|Niger}} نتیجہ: لوا خطا ماڈیول:Flagg میں 77 سطر پر: attempt to call field 'getcachedtable' (a nil value)۔
xX markNo separator is used.{{flagg|uxu|Niger}} نتیجہ: لوا خطا ماڈیول:Flagg میں 77 سطر پر: attempt to call field 'getcachedtable' (a nil value)۔

Third letter: Name

[ترمیم]
LetterMeaningDescriptionExample
ccountryThe country name links to the main country/entity page (default).{{flagg|xxc|Chile}} نتیجہ: لوا خطا ماڈیول:Flagg میں 77 سطر پر: attempt to call field 'getcachedtable' (a nil value)۔
pprefix/suffixThe country name links to the country page with prefixed or suffixed text (default "Flag of ..."), set using |pref= and |suff= (see below).{{flagg|xxp|Chile}} نتیجہ: لوا خطا ماڈیول:Flagg میں 77 سطر پر: attempt to call field 'getcachedtable' (a nil value)۔
ffull prefix/suffixSame as p, except that the prefix and/or suffix is/are displayed.{{flagg|xxf|Chile}} نتیجہ: لوا خطا ماڈیول:Flagg میں 77 سطر پر: attempt to call field 'getcachedtable' (a nil value)۔
llink targetSame as p, except that the target of the link is displayed.{{flagg|xxl|Chile|avar=army}} نتیجہ: لوا خطا ماڈیول:Flagg میں 73 سطر پر: attempt to call field 'getcachedtable' (a nil value)۔
bboth country and prefix/suffixCombined country link and prefix/suffix link: country name links to country page, while prefix and/or suffix link(s) to prefixed/suffixed title.{{flagg|xxb|Chile}} نتیجہ: لوا خطا ماڈیول:Flagg میں 77 سطر پر: attempt to call field 'getcachedtable' (a nil value)۔
uunlinked (cf. {{flagu}})The country name is displayed as plain text, without link.{{flagg|xxu|Chile}} نتیجہ: لوا خطا ماڈیول:Flagg میں 77 سطر پر: attempt to call field 'getcachedtable' (a nil value)۔
ddata templateCountry name is linked to the used country data template, for use in discussion/documentation. Automatically adds redirect=no if a redirect is used.{{flagg|xxd|Chile}} نتیجہ: لوا خطا ماڈیول:Flagg میں 77 سطر پر: attempt to call field 'getcachedtable' (a nil value)۔
aabbreviationCountry name is not linked, but the name of the main country/entity page is presented as mouseover text if it is different.{{flagg|xxa|Chile}} نتیجہ: لوا خطا ماڈیول:Flagg میں 77 سطر پر: attempt to call field 'getcachedtable' (a nil value)۔
{{flagg|xxa|CHI}} نتیجہ: لوا خطا ماڈیول:Flagg میں 77 سطر پر: attempt to call field 'getcachedtable' (a nil value)۔
xX markNo text is displayed.{{flagg|xxx|Chile}} نتیجہ: لوا خطا ماڈیول:Flagg میں 77 سطر پر: attempt to call field 'getcachedtable' (a nil value)۔
*Add *Similar to "p", except that an asterisk (*) is added to the text of the link if it goes to a more specific article.{{flagg|xx*|Chile}} نتیجہ: لوا خطا ماڈیول:Flagg میں 77 سطر پر: attempt to call field 'getcachedtable' (a nil value)۔

Additional options

[ترمیم]

Some additional options can be enabled by appending the following letters to the three-letter code in any order:

LetterDescriptionExample
aAdds the country name (the "name" parameter, or if unset the second unnamed parameter) as alt text and mouseover for the image. If |alt= is used for a custom alt/mouseover text, this does not need to be separately set.{{flagg|uxxa|Pakistan}} نتیجہ: لوا خطا ماڈیول:Flagg میں 77 سطر پر: attempt to call field 'getcachedtable' (a nil value)۔
bBlanks the text portion if a flag is not found.{{flagg|uncb|Xanadu}} نتیجہ: لوا خطا ماڈیول:Flagg میں 77 سطر پر: attempt to call field 'getcachedtable' (a nil value)۔
Compare with:
{{flagg|unc|Xanadu}} نتیجہ: لوا خطا ماڈیول:Flagg میں 77 سطر پر: attempt to call field 'getcachedtable' (a nil value)۔
eUses the name set in the country data template (rather than the first parameter) as display name, like in {{flag country}} (i.e. expands abbreviated forms).{{flagg|unue|PAK}} نتیجہ: لوا خطا ماڈیول:Flagg میں 77 سطر پر: attempt to call field 'getcachedtable' (a nil value)۔
fIf the prefixed/suffixed article name doesn't exist, fallback to linking to the non-prefixed/suffixed page. This may be expensive, and the number of time it can be used on single page is limited.{{flagg|psff|Egypt|pref=Flag templates in}} نتیجہ: لوا خطا ماڈیول:Flagg میں 77 سطر پر: attempt to call field 'getcachedtable' (a nil value)۔
Compare with:
{{flagg|psf|Egypt|pref=Flag templates in}} نتیجہ: لوا خطا ماڈیول:Flagg میں 77 سطر پر: attempt to call field 'getcachedtable' (a nil value)۔
iUses the فہرست ممالک بلحاظ آئی او سی ملکی رموز table from Module:Country alias/data to resolve the country data from the entity parameter.{{flagg|uxxi|BRN}} نتیجہ: لوا خطا ماڈیول:Flagg میں 77 سطر پر: attempt to call field 'getcachedtable' (a nil value)۔
Compare with:
{{flagg|uxx|BRN}} نتیجہ: لوا خطا ماڈیول:Flagg میں 77 سطر پر: attempt to call field 'getcachedtable' (a nil value)۔
lAdds the link name (as defined by the "image" parameter) as alt text and mouseover for the image. If |alt= is used for a custom alt/mouseover text, this does not need to be separately set.{{flagg|cxxl|PAK}} نتیجہ: لوا خطا ماڈیول:Flagg میں 77 سطر پر: attempt to call field 'getcachedtable' (a nil value)۔
Compare with:
{{flagg|cxxa|PAK}} نتیجہ: لوا خطا ماڈیول:Flagg میں 77 سطر پر: attempt to call field 'getcachedtable' (a nil value)۔
oOmits the image and spacing in case the image is an invisible placeholder, i.e., only include the spacing if a flag is displayed. Useful for inline/standalone usages or horizontal lists, where name alignment is not needed.{{flagg|unuo|Pakistan|image=}} نتیجہ: لوا خطا ماڈیول:Flagg میں 77 سطر پر: attempt to call field 'getcachedtable' (a nil value)۔
Compare with:
{{flagg|unu|Pakistan|image=}} نتیجہ: لوا خطا ماڈیول:Flagg میں 77 سطر پر: attempt to call field 'getcachedtable' (a nil value)۔
pWraps the text in Parentheses.{{flagg|unup|Pakistan}} نتیجہ: لوا خطا ماڈیول:Flagg میں 77 سطر پر: attempt to call field 'getcachedtable' (a nil value)۔
rReverses the order of the elements, putting the image to the right of the name; cf. {{flagright}}. Doesn't affect the order of letters in the format code.{{flagg|uncr|Pakistan}} نتیجہ: لوا خطا ماڈیول:Flagg میں 77 سطر پر: attempt to call field 'getcachedtable' (a nil value)۔
wAvoids wrapping by adding <span class="nowrap">...</span> around the output.{{flagg|unuw|Pakistan}} نتیجہ: لوا خطا ماڈیول:Flagg میں 77 سطر پر: attempt to call field 'getcachedtable' (a nil value)۔
tAligns to the left in a table.

Entity (second unnamed parameter)

[ترمیم]

The second parameter is the country or entity name. The template attempts to read the flag and link data from "Template:Country data country"; if that does not exist, the same parameter will be used as default country link and no automatic image will be displayed. The parameter also defines the default displayed country name, if the e option above is not used.

Image parameters

[ترمیم]
|variant= [third unnamed parameter]
Specifies a variant flag image, as defined and documented in each entity's data template. For example, {{flagg|ixx|Germany|naval}} نتیجہ: لوا خطا ماڈیول:Flagg میں 77 سطر پر: attempt to call field 'getcachedtable' (a nil value)۔ uses the "naval" variant of Template:Country data Germany.
|image=
Custom image name, with or without the "File:" namespace prefix. Can be used if the wanted image is not available as variant for the entity (you can alternatively request it be added at the respective data template's talk page), or if no data template exists. Set to "none" ["blank", empty string] to use an unlinked transparent image (functionally identical to the x format).
|size= [|sz=]
Sets the image size; default is 23×15 pixels (larger for some entities). You can use an explicit size in pixels (e.g. 30x20px; the "px" suffix is optional) or one of the relative sizes "xs" (half the default dimensions), "s", "m", "l" and "xl" (twice the default size).
|border=
By default, the flag icon includes a border, except if it is disabled in the entity's country data template. |border= can be set to "yes" ["y", "1"] to force a border when excluded by default, or "no" ["n", "0", empty string] to prevent one.
|align= [|al=]
Set to "left" ["l"], "center" ["centre", "c", "middle", "m"] or "right" ["r"] to set the alignment of the image for the span box (s) and table cell (t) formats. For t, the default is center; for s, it is right-aligned if r is set, else left-aligned.
|width= [|w=]
Sets the width of the span box surrounding the image for the span box (s) format, in pixels, without the "px" suffix. The default is calculated by Module:Flaglist and depends on the image size.
|alt=
Sets alt text and mouseover text for the flag image, if it is for information rather than just decoration. If the wanted text is equal to the entity name, use the a option described above.
|ilink=
Overrides the link target of the image (only use if none of the image formats above allow linking to the desired page).
|noredlink=no
Displays a red link to the missing country data template instead of a placeholder image. If set to notext, no text will be displayed alongside the red link. Defaults to "yes" (no red link displayed).
|missingcategory=category name
Adds the page to category name if the image if the country data is missing.
[ترمیم]
|name=
Changes the displayed country name. Note that with the f format, this includes the prefix and/or suffix.
|clink= [|link=]
Overwrites the link to the country article; this is also used to construct the prefix/suffix link for the f, p and b options.
|pref=, |suff=, |plink=
|pref= and |suff= set the prefix and suffix to use for the prefix/suffix links (format letters f, p and b). The default, if neither is specified, is "Flag of" as prefix (cf. {{flagof}}) and no suffix. |plink= can be used to override the combined link.
|the=
Set to "yes" ["y", "1"] to include the article "the" before the country name in the prefix/suffix links. Example: {{flagg|usf|Philippines|the=1}} نتیجہ: لوا خطا ماڈیول:Flagg میں 77 سطر پر: attempt to call field 'getcachedtable' (a nil value)۔. Use |pthe= if the link needs "the" but the name doesn't, and |nthe= if the name needs it but the link doesn't.
|section=
Links to a section of the linked article without displaying the section name. If both a country link and a prefix/suffix link are used, use |csection= for a section of the country article, and |psection= for a section of the prefixed/suffixed article.
|altvar= [|avar=], |age=
Enables using one of a set of standard suffixes for linking to sports teams and militaries. The altvar and suffix data is loaded from Module:Flagg/Altvar data. The possible parameter values are the base names of the corresponding specialized templates; alias values from full sports names exist (see examples below and data page). For some entities this also changes the image to a variant specific to a sport or military branch; for example, {{flagg|usp|Ireland|avar=ru}} نتیجہ: لوا خطا ماڈیول:Flagg میں 73 سطر پر: attempt to call field 'getcachedtable' (a nil value)۔ uses the IRFU flag to represent the Irish rugby union team. For youth teams in some sports (see the data page), the age limit must be additionally set using |age=.
|nalign= [|nal=]
Sets the alignment of the text in table cell format (t). The default is left; the possible values are the same as for |align=.
|preftext=
Adds a text-only prefix that is not included in the link. This text is not affected by any option other than b for blanking text if no flag found. It will be separated from the link text by &nbsp; unless the x or n separator options are specified (in which case it will use nothing or a line break, respectively).
|text=
Overrides the entire text; only use when necessary for any nonstandard formats. Alternatively, you can set the third letter of the format parameter to x (no text) and add custom text outside the template.
|nodata=y
Overrides attempts to use the corresponding {{country data ...}} template, which is useful when the corresponding data template doesn't exist.
|pref2=, |suff2=, |plink2=, |psection2=
If the f extra is specified, and the prefix/suffixed article name being linked to doesn't exist, then use these parameters as an alternate prefix/suffix, and check if it exists as well. (If it still doesn't exist, then fall back to the non-prefixed/suffixed page as normal). This may be expensive, and the number of time it can be used on single page is limited.

Examples

[ترمیم]

Formats:

  • {{flagg|usc|Fiji}} نتیجہ: لوا خطا ماڈیول:Flagg میں 77 سطر پر: attempt to call field 'getcachedtable' (a nil value)۔ (default format)
  • {{flagg||Fiji}} نتیجہ: لوا خطا ماڈیول:Flagg میں 77 سطر پر: attempt to call field 'getcachedtable' (a nil value)۔ (default format)
  • {{flagg|pnbr|Fiji}} نتیجہ: لوا خطا ماڈیول:Flagg میں 77 سطر پر: attempt to call field 'getcachedtable' (a nil value)۔
  • <span style="display:inline-block;text-align:center;">{{flagg|ilf|Fiji|sz=xl}}</span> لوا خطا ماڈیول:Flagg میں 77 سطر پر: attempt to call field 'getcachedtable' (a nil value)۔

Table format & alignment:

{{flagg|utu|Jamaica}}لوا خطا ماڈیول:Flagg میں 77 سطر پر: attempt to call field 'getcachedtable' (a nil value)۔
{{flagg|utur|Jamaica}}لوا خطا ماڈیول:Flagg میں 77 سطر پر: attempt to call field 'getcachedtable' (a nil value)۔
{{flagg|utu|Jamaica|al=l|nal=l}}لوا خطا ماڈیول:Flagg میں 77 سطر پر: attempt to call field 'getcachedtable' (a nil value)۔
{{flagg|utu|Jamaica|al=c|nal=c}}لوا خطا ماڈیول:Flagg میں 77 سطر پر: attempt to call field 'getcachedtable' (a nil value)۔
{{flagg|utu|Jamaica|al=r|nal=r}}لوا خطا ماڈیول:Flagg میں 77 سطر پر: attempt to call field 'getcachedtable' (a nil value)۔
  • {{flagg|usu|Switzerland}} نتیجہ: لوا خطا ماڈیول:Flagg میں 77 سطر پر: attempt to call field 'getcachedtable' (a nil value)۔
  • {{flagg|usu|Switzerland|al=l}} نتیجہ: لوا خطا ماڈیول:Flagg میں 77 سطر پر: attempt to call field 'getcachedtable' (a nil value)۔
  • {{flagg|usu|Switzerland|al=c}} نتیجہ: لوا خطا ماڈیول:Flagg میں 77 سطر پر: attempt to call field 'getcachedtable' (a nil value)۔
  • {{flagg|usu|Switzerland|al=r}} نتیجہ: لوا خطا ماڈیول:Flagg میں 77 سطر پر: attempt to call field 'getcachedtable' (a nil value)۔

Standard image & name parameters:

  • {{flagg|isc|Myanmar}} نتیجہ: لوا خطا ماڈیول:Flagg میں 77 سطر پر: attempt to call field 'getcachedtable' (a nil value)۔
  • {{flagg|isc|Myanmar|border=}} نتیجہ: لوا خطا ماڈیول:Flagg میں 77 سطر پر: attempt to call field 'getcachedtable' (a nil value)۔
  • {{flagg|isc|Myanmar|1974}} نتیجہ: لوا خطا ماڈیول:Flagg میں 77 سطر پر: attempt to call field 'getcachedtable' (a nil value)۔
  • {{flagg|isc|Myanmar|variant=1974}} نتیجہ: لوا خطا ماڈیول:Flagg میں 77 سطر پر: attempt to call field 'getcachedtable' (a nil value)۔
  • {{flagg|isc|Myanmar|name=Burma|variant=1974}} نتیجہ: لوا خطا ماڈیول:Flagg میں 77 سطر پر: attempt to call field 'getcachedtable' (a nil value)۔
  • {{flagg|isc|Burma|variant=1974}} نتیجہ: لوا خطا ماڈیول:Flagg میں 77 سطر پر: attempt to call field 'getcachedtable' (a nil value)۔
  • {{flagg|isc|Myanmar|sz=30}} نتیجہ: لوا خطا ماڈیول:Flagg میں 77 سطر پر: attempt to call field 'getcachedtable' (a nil value)۔
  • {{flagg|isc|Myanmar|size=30}} نتیجہ: لوا خطا ماڈیول:Flagg میں 77 سطر پر: attempt to call field 'getcachedtable' (a nil value)۔
  • {{flagg|isc|Myanmar|size=30px}} نتیجہ: لوا خطا ماڈیول:Flagg میں 77 سطر پر: attempt to call field 'getcachedtable' (a nil value)۔
  • {{flagg|isc|Myanmar|size=30x18px}} نتیجہ: لوا خطا ماڈیول:Flagg میں 77 سطر پر: attempt to call field 'getcachedtable' (a nil value)۔
  • {{flagg|isc|Myanmar|size=xs}} نتیجہ: لوا خطا ماڈیول:Flagg میں 77 سطر پر: attempt to call field 'getcachedtable' (a nil value)۔
  • {{flagg|isc|Myanmar|size=xl}} نتیجہ: لوا خطا ماڈیول:Flagg میں 77 سطر پر: attempt to call field 'getcachedtable' (a nil value)۔
  • {{flagg|isc|Myanmar|width=30|size=xs}} نتیجہ: لوا خطا ماڈیول:Flagg میں 77 سطر پر: attempt to call field 'getcachedtable' (a nil value)۔
  • {{flagg|isc|Myanmar|image=}} نتیجہ: لوا خطا ماڈیول:Flagg میں 77 سطر پر: attempt to call field 'getcachedtable' (a nil value)۔
  • {{flagg|isc|Myanmar|image=Flag of None.svg}} لوا خطا ماڈیول:Flagg میں 77 سطر پر: attempt to call field 'getcachedtable' (a nil value)۔
  • {{flagg|isc|Myanmar|image=File:Flag of None.svg}} لوا خطا ماڈیول:Flagg میں 77 سطر پر: attempt to call field 'getcachedtable' (a nil value)۔

Links and altvars:

  • {{flagg|psp|Egypt}} نتیجہ: لوا خطا ماڈیول:Flagg میں 77 سطر پر: attempt to call field 'getcachedtable' (a nil value)۔
  • {{flagg|psf|Egypt}} نتیجہ: لوا خطا ماڈیول:Flagg میں 77 سطر پر: attempt to call field 'getcachedtable' (a nil value)۔
  • {{flagg|psb|Egypt}} نتیجہ: لوا خطا ماڈیول:Flagg میں 77 سطر پر: attempt to call field 'getcachedtable' (a nil value)۔
  • {{flagg|psb|Philippines|the=1}} نتیجہ: لوا خطا ماڈیول:Flagg میں 77 سطر پر: attempt to call field 'getcachedtable' (a nil value)۔
  • {{flagg|csc|Egypt|section=History}} نتیجہ: لوا خطا ماڈیول:Flagg میں 77 سطر پر: attempt to call field 'getcachedtable' (a nil value)۔
  • {{flagg|csb|Egypt|csection=History}} نتیجہ: لوا خطا ماڈیول:Flagg میں 77 سطر پر: attempt to call field 'getcachedtable' (a nil value)۔
  • {{flagg|psb|Egypt|psection=Kingdom of Egypt (1922–1953)|variant=1922}} نتیجہ: لوا خطا ماڈیول:Flagg میں 77 سطر پر: attempt to call field 'getcachedtable' (a nil value)۔
  • {{flagg|psb|Egypt|plink=List of Egyptian flags}} نتیجہ: لوا خطا ماڈیول:Flagg میں 77 سطر پر: attempt to call field 'getcachedtable' (a nil value)۔
  • {{flagg|psf|Egypt|pref=History of}} نتیجہ: لوا خطا ماڈیول:Flagg میں 77 سطر پر: attempt to call field 'getcachedtable' (a nil value)۔
  • {{flagg|psp|Egypt|suff=at the Olympics}} نتیجہ: لوا خطا ماڈیول:Flagg میں 77 سطر پر: attempt to call field 'getcachedtable' (a nil value)۔
  • {{flagg|psp|Egypt|avar=fb}} نتیجہ: لوا خطا ماڈیول:Flagg میں 73 سطر پر: attempt to call field 'getcachedtable' (a nil value)۔
  • {{flagg|psp|Egypt|avar=football}} نتیجہ: لوا خطا ماڈیول:Flagg میں 73 سطر پر: attempt to call field 'getcachedtable' (a nil value)۔
  • {{flagg|psp|Egypt|avar=fbu|age=20}} نتیجہ: لوا خطا ماڈیول:Flagg میں 73 سطر پر: attempt to call field 'getcachedtable' (a nil value)۔
  • {{flagg|psl|Egypt|avar=navy}} نتیجہ: لوا خطا ماڈیول:Flagg میں 73 سطر پر: attempt to call field 'getcachedtable' (a nil value)۔
  • {{flagg|unapi|EGY|preftext=Sara Ahmed}} نتیجہ: لوا خطا ماڈیول:Flagg میں 77 سطر پر: attempt to call field 'getcachedtable' (a nil value)۔

Non-existing data template:

  • {{flagg|isc|EUSSR|nodata=1}} نتیجہ:  EUSSR
  • {{flagg|isc|EUSSR|image=EUSSR red flag.svg|size=xl|nodata=1}} نتیجہ:  EUSSR
[ترمیم]
See also: Help:Table#Adding links to specialized country, state, etc. articles. With asterisk. Section below copied from there. Please update here as changes are made there.

For example:

Once you have a table with {{flaglist}}, and/or other flag template such as {{flag}}, it is easy to convert the links to specialized links. So instead of اوکلاہوما you would have Incarceration in Oklahoma, or if that article does not exist, then Crime in Oklahoma.

This works with full country or US state names. Also with abbreviated (3-letter) country names, and abbreviated (2-letter) US state names.

Use a global find-and-replace as previously described, but without regular expressions. Replace:

{{پرچم|

or

{{flaglist|

with

{{flagg|us*eft|pref=Incarceration in|pref2=Crime in|

The bar after flag or flaglist is necessary to avoid problems in case you have to replace 2 flag templates.

The {{flagg}} template looks for the articles. If it finds one of the two choices it adds the link and an asterisk after the location name. If it does not find either article, it just adds the standard link.

Substitute your preferred topics in the pref= and pref2= spots.

{{flagg|us*eft| usually left aligns the text of that column (due to the "t" at the end of the code). For some unknown reason that is not always true. In that case each cell in that column will need style=text-align:left in it. Or use the whole column code described here: #Column alignment and here: {{Table alignment}}. See example table.

Washington, D.C. - Have to force the full name to be shown:

{{flagg|us*eft|pref=Crime in|Washington, D.C.|name=Washington, D.C.}}

This particular use of {{flagg}} parameters is expensive and can only be used on a few hundred links per article. Every time the article is saved it occurs, even for null edits. So only one big country table per article. Other country tables in the same article should use standard links.

In فہرست ممالک بلحاظ شرح اسیری the {{flagg}} template creates a link to ریاستہائے متحدہ امریکا میں پابندی سلاسل. That link is a redirect to ریاستہائے متحدہ امریکا میں پابندی سلاسل. Add "the" as necessary to create redirect pages. Admins will delete redirects that are not linked from within Wikipedia. So if you need to create redirects be sure to use them right away in an article table. Or keep them in a sandbox that the admins can see until you use them in an article table. See examples. See list.

{{Flagg}} removes the names of the countries behind territories, subnational areas, etc.. This makes for more compact tables. Other flag templates (such as {{flaglist}}) do not do that. But that template can not create specialized country links.

See Global Search at Toolforge. Search for
"{{flagg|us*eft" - in quotes. To get transclusion count and list of articles.

The {{flagg}} template does not work if colspan is used before the country/state name. {{flag+link}} works. See: Template talk:Flagg#Does not work with colspan. See section farther down for {{flag+link}} info: #Without asterisks. Only one preference.

Comparison with other templates

[ترمیم]

These "specialized" templates predate Flagg, and while most do not have options for custom links and images, they are probably faster because they only do two transclusions without invoking Lua.

General templates

[ترمیم]
TemplateCorresponding {{flagg}} syntaxExample
{{flag|country}}{{flagg|uncb|country}}{{flag|China}} نتیجہ:  چین
{{flagg|unc|China}} نتیجہ: لوا خطا ماڈیول:Flagg میں 77 سطر پر: attempt to call field 'getcachedtable' (a nil value)۔
{{flagbig|country}}{{flagg|ulc|country|sz=l}}{{flagbig|China}} نتیجہ:
چین
{{flagg|ulc|China|sz=l}} نتیجہ: لوا خطا ماڈیول:Flagg میں 77 سطر پر: attempt to call field 'getcachedtable' (a nil value)۔
{{flagc|country}}{{flagg|inc|country}}{{flagc|China}} نتیجہ: flag China
{{flagg|inc|China}} نتیجہ: لوا خطا ماڈیول:Flagg میں 77 سطر پر: attempt to call field 'getcachedtable' (a nil value)۔
{{flag country|country}}{{flagg|unce|country}}{{flag country|CHN}} نتیجہ:  چین
{{flagg|unce|CHN}} نتیجہ: لوا خطا ماڈیول:Flagg میں 77 سطر پر: attempt to call field 'getcachedtable' (a nil value)۔
{{flag decoration|country}}{{flagg|uxxo|country}}{{flag decoration|China}} نتیجہ:
{{flagg|uxx|China}} نتیجہ: لوا خطا ماڈیول:Flagg میں 77 سطر پر: attempt to call field 'getcachedtable' (a nil value)۔
{{flag icon|country}}{{flagg|cxxlo|country}}{{flag icon|China}} نتیجہ: چین کا پرچم
{{flagg|cxxlo|China}} نتیجہ: لوا خطا ماڈیول:Flagg میں 77 سطر پر: attempt to call field 'getcachedtable' (a nil value)۔
{{flagicon image|image}}{{flagg|uxx|image=image}}{{flagicon image|Flag of China.svg}} نتیجہ:
{{flagg|uxx|image=Flag of China.svg}} نتیجہ: لوا خطا ماڈیول:Flagg میں 77 سطر پر: attempt to call field 'getcachedtable' (a nil value)۔
{{flag link|country|suffix}}{{flagg|unpe|country|suff=suffix}}{{flag link|China|at the Hopman Cup}} نتیجہ:  چین
{{flagg|unpe|China|suff=at the Hopman Cup}} نتیجہ: لوا خطا ماڈیول:Flagg میں 77 سطر پر: attempt to call field 'getcachedtable' (a nil value)۔
{{flag+link|prefix|country}}{{flagg|unpe|country|pref=prefix}} (no existence check)
{{flagg|unpef|country|pref=prefix}} (expensive)
{{flag+link|Agriculture in|China}} نتیجہ: لوا خطا ماڈیول:Flagg میں 77 سطر پر: attempt to call field 'getcachedtable' (a nil value)۔ [[چین |چین ]]



{{flagg|unpe|China|pref=Agriculture in}} نتیجہ: لوا خطا ماڈیول:Flagg میں 77 سطر پر: attempt to call field 'getcachedtable' (a nil value)۔
{{flagg|unpef|China|pref=Examples in}} نتیجہ: لوا خطا ماڈیول:Flagg میں 77 سطر پر: attempt to call field 'getcachedtable' (a nil value)۔

{{flaglist|country}}{{flagg|usc|country}}{{flaglist|China}} نتیجہ: China
{{flagg|usc|China}} نتیجہ: لوا خطا ماڈیول:Flagg میں 77 سطر پر: attempt to call field 'getcachedtable' (a nil value)۔
{{flagof|country}}{{flagg|unp|country|sz=l}}{{flagof|China}} نتیجہ: لوا خطا ماڈیول:Flagg میں 77 سطر پر: attempt to call field 'getcachedtable' (a nil value)۔
{{flagg|unp|China|sz=l}} نتیجہ: لوا خطا ماڈیول:Flagg میں 77 سطر پر: attempt to call field 'getcachedtable' (a nil value)۔
{{flagright|country}}{{flagg|uncr|country}}{{flagright|China}} نتیجہ: China 
{{flagg|uncr|China}} نتیجہ: لوا خطا ماڈیول:Flagg میں 77 سطر پر: attempt to call field 'getcachedtable' (a nil value)۔
{{flagu|country}}{{flagg|unu|country}}{{flagu|China}} نتیجہ:  چین
{{flagg|unu|China}} نتیجہ: لوا خطا ماڈیول:Flagg میں 77 سطر پر: attempt to call field 'getcachedtable' (a nil value)۔
{{noflag|country}}{{flagg|xnu|country}}{{noflag|China}} نتیجہ:  China
{{flagg|xnu|China}} نتیجہ: لوا خطا ماڈیول:Flagg میں 77 سطر پر: attempt to call field 'getcachedtable' (a nil value)۔
{{noflag|[[country]]}}{{flagg|xnc|country}}{{noflag|[[چین]]}} نتیجہ:  چین
{{flagg|xnc|China}} نتیجہ: لوا خطا ماڈیول:Flagg میں 77 سطر پر: attempt to call field 'getcachedtable' (a nil value)۔

Sports/military templates

[ترمیم]

The football templates are used as examples here; other sports that have separate templates work correspondingly.

TemplateCorresponding {{flagg}} syntaxExample
{{fb|country}}{{flagg|unpe|country|avar=fb}}{{fb|China}} نتیجہ:  چین
{{flagg|unpe|China|avar=fb}} نتیجہ: لوا خطا ماڈیول:Flagg میں 73 سطر پر: attempt to call field 'getcachedtable' (a nil value)۔
{{fb|country|align=1}}{{flagg|uspe|country|avar=fb|al=c}}{{fb|China|align=1}} نتیجہ: سانچہ:Flag link/aligned
{{flagg|uspe|China|avar=fb|al=c}} نتیجہ: لوا خطا ماڈیول:Flagg میں 73 سطر پر: attempt to call field 'getcachedtable' (a nil value)۔
{{fb-big|country}}{{flagg|ulpe|country|avar=fb|sz=l}}{{fb-big|China}} نتیجہ:
China PR
{{flagg|ulpe|China|avar=fb|sz=l}} نتیجہ: لوا خطا ماڈیول:Flagg میں 73 سطر پر: attempt to call field 'getcachedtable' (a nil value)۔
{{fb-rt|country}}{{flagg|unpre|country|avar=fb}}{{fb-rt|China}} نتیجہ: China PR 
{{flagg|unpre|China|avar=fb}} نتیجہ: لوا خطا ماڈیول:Flagg میں 73 سطر پر: attempt to call field 'getcachedtable' (a nil value)۔
{{fbicon|country}}{{flagg|pxxl|country|avar=fb}}{{fbicon|China}} نتیجہ: چین
{{flagg|pxxl|China|avar=fb}} نتیجہ: لوا خطا ماڈیول:Flagg میں 73 سطر پر: attempt to call field 'getcachedtable' (a nil value)۔
{{fbu|age|country}}{{flagg|unpe|country|avar=fbu|age=age}}{{fbu|17|China}} نتیجہ:  China PR
{{flagg|unpe|China|avar=fbu|age=17}} نتیجہ: لوا خطا ماڈیول:Flagg میں 73 سطر پر: attempt to call field 'getcachedtable' (a nil value)۔
{{fbw|country}}{{flagg|unpe|country|avar=fbw}}{{fbw|China}} نتیجہ:  چین
{{flagg|unpe|China|avar=fbw}} نتیجہ: لوا خطا ماڈیول:Flagg میں 73 سطر پر: attempt to call field 'getcachedtable' (a nil value)۔
{{fbwu|age|country}}{{flagg|unpe|country|avar=fbwu|age=age}}{{fbwu|17|China}} نتیجہ:  China PR
{{flagg|unpe|China|avar=fbwu|age=17}} نتیجہ: لوا خطا ماڈیول:Flagg میں 73 سطر پر: attempt to call field 'getcachedtable' (a nil value)۔
{{army|country}}{{flagg|unl|country|avar=army}}{{army|China}} نتیجہ:  پیپلز لبریشن آرمی بری فورس
{{flagg|unl|China|avar=army}} نتیجہ: لوا خطا ماڈیول:Flagg میں 73 سطر پر: attempt to call field 'getcachedtable' (a nil value)۔
{{navy|country}}{{flagg|unl|country|avar=navy}}{{navy|China}} نتیجہ:  پیپلز لبریشن آرمی نیوی
{{flagg|unl|China|avar=navy}} نتیجہ: لوا خطا ماڈیول:Flagg میں 73 سطر پر: attempt to call field 'getcachedtable' (a nil value)۔
{{air force|country}}{{flagg|unl|country|avar=air force}}{{air force|China}} نتیجہ:  پیپلز لبریشن آرمی ایئر فورس
{{flagg|unl|China|avar=air force}} نتیجہ: لوا خطا ماڈیول:Flagg میں 73 سطر پر: attempt to call field 'getcachedtable' (a nil value)۔
{{armed forces|country}}{{flagg|usl|country|avar=military}}{{armed forces|China}} نتیجہ:  پیپلز لبریشن آرمی
{{flagg|usl|China|avar=military}} نتیجہ: لوا خطا ماڈیول:Flagg میں 73 سطر پر: attempt to call field 'getcachedtable' (a nil value)۔