Andoza:Bayroqikon/doc: Versiyalar orasidagi farq

Kontent oʻchirildi Kontent qoʻshildi
Addbot (munozara | hissa)
k Bot: Migrating interwiki links, now provided by Wikidata on d:q4582585
Tahrir izohi yoʻq
Qator 1:
{{documentation subpage}}
{{high-use|546000+}}
Шаблон добавляет стране ссылку и флаг. Принимает страну как просто текстом, так и уже со ссылкой. Чувствителен к регистру. Если вы хотите добавить новую страну в базу, воспользуйтесь [[Andoza:Bayroqikon/doc/Misol|примером]] и с его помощью страницу ''Andoza:Bayroqikon/Mamlakat''.
<!-- Categories go at the bottom of this page and interwikis go in Wikidata. -->
 
'''Template:Flagicon''' displays a flag of the named parameter in "icon" size, currently 23×15 pixels maximally (defined in [[Template:Flagicon/core]]), plus a one-pixel border. The image also has a clickable link to the associated article. For an unlinked flag icon, use [[Template:Flagdeco]] instead.
Если шаблон не обрабатывает какую-то страну или делает это неправильно, напишите, пожалуйста, об этом в обсуждении шаблона. Помимо стран могут использоваться разного рода регионы и организации.
 
Please consider the [[Wikipedia:Manual of Style (icons)#Flags|Manual of Style section on flag]]s before using this template.
* [[special:prefixindex/Andoza:Bayroqikon/|Список доступных стран]]
 
== Foydalanish Usage==
<code><nowiki>{{flagicon|name|variant=|size=|noredlink=}}</nowiki></code>
<pre>{{Bayroqikon|Mamlakat}}</pre>
 
;name: The first parameter is mandatory, and identifies the name of the country, region, city, etc. A full list of available values can be found in [[:Category:Country data templates]]. For example, [[:Template:Country data Bulgaria]] is used when the ''name'' parameter is specified as <code>Bulgaria</code>. Many flags are also available via shortened "aliases", such as standard three-letter country codes as specified by [[ISO 3166-1 alpha-3]], [[List of IOC country codes|IOC]], or [[List of FIFA country codes|FIFA]]. The list of available "aliases" is found in [[:Category:Country data redirects]]. Many of these country codes could be considered obscure, so it is recommended to use the full country name.
Доступны два необязательных параметра: вариант и размер флага.
;variant: The second parameter is optional, and identifies a flag variant to be used instead of the standard flag. This is most often used for historical flags but can also be used to specify naval flags, sport-use flags, etc. The list of available flag variants for each country is documented on the specific page for the country data template. For example, [[Template:Country data Bulgaria]] includes a description of each of the available flag variations for Bulgaria. This parameter can be a named parameter (e.g.. "<code>variant=1815</code>"), or a positional parameter, always after the country name.
*Список доступных вариантов флага для конкретной страны можно посмотреть в её шаблоне вида '''Andoza:Bayroqikon/'''''mamlakat''.
;size: This parameter is optional, and is used to specify the maximum width and/or height of the flag image. This parameter is specified using standard [[Wikipedia:Extended image syntax|image syntax]].
*Размер в пикселях задаётся выражением вида: '''hajm='''''<small> ширина </small>'''''x'''''<small> высота </small>'''''px''' ''(hajm=22x20px)'' или '''hajm='''''<small> ширина </small>'''''px''' ''(hajm=22px)''. Во втором случае высота будет вычислена пропорционально ширине. По умолчанию используется размер 22x20px.
 
==Template Misollar data==
{{TemplateData header}}
'''Oʻzbekiston'''. Доступные варианты флагов в шаблоне {{tl|Bayroqikon/Oʻzbekiston}} :
<templatedata>
{||-
{
|
"description": "This template displays a wikilinked flag of the named parameter in 'icon' size, currently 23×15 pixels (defined in Template:Flagicon/core) plus a one-pixel border.",
:<code><nowiki>{{Bayroqikon|Oʻzbekiston}}</nowiki></code>
"params": {
"1": {
"label": "Name",
"description": "Name of the country, region, city, etc.; full name is recommended for countries",
"type": "string",
"required": true
},
"variant": {
"label": "Variant",
"description": "Identifies a flag variant to be used instead of the standard flag, e.g. 1815",
"type": "string",
"required": false,
"aliases": [
"2"
]
},
"size": {
"label": "Maximum dimension",
"description": "The maximum width or height, specified via standard 'extended image syntax' (e.g. x30px)",
"type": "string",
"required": false
},
"noredlink": {
"label": "No redlink",
"description": "If set to any value which evaluates as true (i.e. '1', 'true', 'yes', or 'y'), it displays nothing if the country data file doesn't exist. (The default is to display a redlink)",
"type": "string",
"required": false
}
}
}
</templatedata>
 
==Examples==
:<code><nowiki>{{Bayroqikon|Oʻzbekiston|1858}}</nowiki></code>
{| class="wikitable"
! Wikicode !! Results !! Notes
|-
| <code><nowiki>{{flagicon|Bolgariya}}</nowiki></code> || {{flagicon|Bolgariya}} ||
|-
| <code><nowiki>{{flagicon|BUL}}</nowiki></code> || {{flagicon|BUL}} || Uses the ISO/IOC/FIFA country code
|-
| <code><nowiki>{{flagicon|Bolgariya|1946}}</nowiki></code> || {{flagicon|Bolgariya|1946}} || rowspan="2"| Specifies a historical flag
|-
| <code><nowiki>{{flagicon|Bolgariya|variant=1946}}</nowiki></code> || {{flagicon|Bolgariya|variant=1946}}
|-
| <code><nowiki>{{flagicon|BUL|naval}}</nowiki></code> || {{flagicon|BUL|naval}} || Specifies the naval ensign
|-
| <code><nowiki>{{flagicon|BUL|air force}}</nowiki></code> || {{flagicon|BUL|air force}} || Specifies the air force flag
|-
| <code><nowiki>{{flagicon|Bulgaria|size=50px}}</nowiki></code> || {{flagicon|Bolgariya|size=50px}} || Sets width to 50 pixels
|-
| <code><nowiki>{{flagicon|Xanadu}}</nowiki></code> || [[Template:Country data Xanadured]] || No flag for Xanadu, so displays redlink
|-
| <code><nowiki>{{flagicon|Xanadu|noredlink=yes}}</nowiki></code> || {{flagicon|Xanadu|noredlink=yes}} || No flag, so displays nothing
|}
 
==Implementation notes==
:<code><nowiki>{{Bayroqikon|Oʻzbekiston|1858|hajm=44x20px}}</nowiki></code>
This template uses the data templates listed under [[:Category:Country data templates]], which contain the data specifying '''what''' to display and the formatter [[Template:Flagicon/core]], which contains the logic of '''how''' to display the flag.
 
:* <code><nowiki>{{Bayroqikonflagicon|Oʻzbekiston|hajm=44px|1858Bolgariya}}</nowiki></code> → {{flagicon|Bulgaria}} — uses [[Template:Country data Bulgaria]]
* <code><nowiki>{{flagicon|BUL}}</nowiki></code> → {{flagicon|BUL}} — uses [[Template:Country data BUL]], which is a redirect to [[Template:Country data Bulgaria]]
|
:{{Bayroqikon|Oʻzbekiston}}
 
Inside each country data template, this template uses the following parameters:
:{{Bayroqikon|Oʻzbekiston|1858}}
* <code>flag alias</code> — name of the image file to display
* <code>flag alias-xxxx</code> — name of the image file of flag variant <code>xxxx</code>
* <code>alias</code> — used to display the [[alt attribute]] of the image (defaults to "Flag of ''alias''")
 
== Tracking categories ==
:{{Bayroqikon|Oʻzbekiston|1858|hajm=44x20px}}
*{{clc|Pages using flagicon template with unknown parameters}}
 
Where <code><nowiki>{{Flagicon|Foo}}</nowiki></code> is used, but the <code><nowiki>Template:Country data Foo</nowiki></code> does not exist, then a [[WP:Red link|redlink]] is displayed, ''unless'' the {{para|noredlink|yes}} parameter has been set.
:{{Bayroqikon|Oʻzbekiston|hajm=44x20px|1858}}
|}
 
Where the redlink is displayed, the page is addded to a tracking category:
'''Boshqa mamlakatlar:'''
{||-
|
:<code><nowiki>{{Bayroqikon|SSSR}}</nowiki></code>
 
* [[:Category:Flagicons with missing country data templates]] (population: {{PAGESINCATEGORY:Flagicons with missing country data templates}})
:<code><nowiki>{{Bayroqikon|RSFSR}}</nowiki></code>
 
==Related templates==
:<code><nowiki>{{Bayroqikon|Ukraina}}</nowiki></code>
* [[Template:Flag]] is used to display a wikilinked name next to the flag. The displayed name will be the same as the parameter used with the template, but the link target will be the main article for the country (in these examples, [[Bulgaria]]).
** <code><nowiki>{{flag|Bulgaria}}</nowiki></code> → {{flag|Bulgaria}}
** <code><nowiki>{{flag|BUL}}</nowiki></code> → {{flag|BUL}}
* [[Template:Flagcountry]] is also used to display a wikilinked name next to the flag. The displayed name will always be the same, regardless of whether or not a country code alias is used as the template parameter.
** <code><nowiki>{{flagcountry|Bulgaria}}</nowiki></code> → {{flagcountry|Bulgaria}}
** <code><nowiki>{{flagcountry|BUL}}</nowiki></code> → {{flagcountry|BUL}}
* [[Template:Flagdeco]] displays an unlinked flag icon without country name.
** <code><nowiki>{{flagdeco|Bulgaria}}</nowiki></code> → {{flagdeco|Bulgaria}}
For a full list of flag templates, see [[:Category:Flag template system]].
 
==Alternatives to avoid Wikipedia's [[WP:PEIS|Post-expand include size]] limit==
:<code><nowiki>{{Bayroqikon|Ukraina SSR}}</nowiki></code>
Pages with many flag icons may come close to or exceed Wikipedia's [[WP:PEIS|Post-expand include size]] limit. In these cases consider using modules or module-wrapper templates instead:
|
* {{tl|flagg}} is a simple wrapper for [[Module:Flagg]]: For basic use, <code><nowiki>{{flagicon|</nowiki>''country''<nowiki>}}</nowiki></code> can be replaced with <code><nowiki>{{flagg|cxxlo|</nowiki>''country''<nowiki>}}</nowiki></code>
:{{Bayroqikon|SSSR}}
 
:{{Bayroqikon|RSFSR}}
 
:{{Bayroqikon|Ukraina}}
 
<includeonly>{{Sandbox other||
:{{Bayroqikon|Ukraina SSR}}
[[Category:Flag template system]]
|}
 
}}</includeonly>
== Shuningdek qarang ==
* {{tl|Bayroq}}
* {{tl|RUS}}<includeonly>
[[en:Template:Flagcountry]]
[[fr:Template:Flagcountry]]
[[hy:Կաղապար:Ֆլագիֆիկացիա]]
[[os:Шаблон:Флагификаци]]
[[sl:Predloga:Zastava države]]
[[sv:Mall:Flaggland]]
 
[[Turkum:Andozalar:Andoza uchun]]
[[Turkum:Andozalar:Davlat bayroqlari|*]]
</includeonly>
 
== Andoza parametrlari ==
<templatedata>{
"description": "Ushbu andoza uchun tavsif berilmagan. Andozaga izoh kiritib loyihaga yordam berishingiz mumkin.",
"params": {
"1": {
"label": "1",
"description": "Ushbu parametrga izoh berilmagan. Parametrga izoh kiritib loyihaga yordam berishingiz mumkin",
"type": "string",
"required": false
},
"variant": {
"label": "Variant",
"description": "Ushbu parametrga izoh berilmagan. Parametrga izoh kiritib loyihaga yordam berishingiz mumkin",
"type": "string",
"required": false
},
"hajm": {
"label": "Hajm",
"description": "Ushbu parametrga izoh berilmagan. Parametrga izoh kiritib loyihaga yordam berishingiz mumkin",
"type": "string",
"required": false
}
,
"2": {
"label": "2",
"description": "Ushbu parametrga izoh berilmagan. Parametrga izoh kiritib loyihaga yordam berishingiz mumkin",
"type": "string",
"required": false
}}}</templatedata>