Template:Yesno
- English
- español
- 日本語
- français
- 中文
- русский
- português
- polski
- Nederlands
- العربية
- аԥсшәа
- Acèh
- Afrikaans
- алтай тил
- አማርኛ
- Obolo
- الدارجة
- مصرى
- অসমীয়া
- asturianu
- azərbaycanca
- تۆرکجه
- башҡортса
- Basa Bali
- Boarisch
- Batak Toba
- Bikol Central
- беларуская
- беларуская (тарашкевіца)
- Betawi
- български
- भोजपुरी
- বাংলা
- bosanski
- Batak Mandailing
- буряад
- català
- Chavacano de Zamboanga
- 閩東語 / Mìng-dĕ̤ng-ngṳ̄
- нохчийн
- Cebuano
- کوردی
- corsu
- чӑвашла
- Cymraeg
- dansk
- Zazaki
- डोटेली
- ދިވެހިބަސް
- ཇོང་ཁ
- Ελληνικά
- eesti
- euskara
- فارسی
- suomi
- Na Vosa Vakaviti
- føroyskt
- arpetan
- Frysk
- 贛語
- galego
- گیلکی
- गोंयची कोंकणी / Gõychi Konknni
- Bahasa Hulontalo
- 𐌲𐌿𐍄𐌹𐍃𐌺
- ગુજરાતી
- gungbe
- Gaelg
- Hausa
- 客家語 / Hak-kâ-ngî
- עברית
- Fiji Hindi
- hrvatski
- magyar
- հայերեն
- Արեւմտահայերէն
- Bahasa Indonesia
- Ilokano
- гӀалгӀай
- íslenska
- Jawa
- ქართული
- Qaraqalpaqsha
- Kumoring
- қазақша
- ភាសាខ្មែរ
- ಕನ್ನಡ
- 한국어
- kurdî
- Kʋsaal
- kernowek
- кыргызча
- Latina
- Lëtzebuergesch
- лакку
- лезги
- Ladin
- latgaļu
- latviešu
- Madhurâ
- मैथिली
- мокшень
- Malagasy
- Māori
- Minangkabau
- македонски
- മലയാളം
- монгол
- ဘာသာမန်
- मराठी
- Bahasa Melayu
- Malti
- Mirandés
- မြန်မာဘာသာ
- эрзянь
- नेपाली
- नेपाल भाषा
- Novial
- Sesotho sa Leboa
- Chi-Chewa
- ଓଡ଼ିଆ
- ирон
- ਪੰਜਾਬੀ
- Pangasinan
- Kapampangan
- پنجابی
- پښتو
- Runa Simi
- ikirundi
- română
- руски
- русиньскый
- संस्कृतम्
- Scots
- سنڌي
- srpskohrvatski / српскохрватски
- တႆး
- සිංහල
- Simple English
- slovenčina
- slovenščina
- Gagana Samoa
- anarâškielâ
- chiShona
- Soomaaliga
- shqip
- српски / srpski
- Sunda
- svenska
- ꠍꠤꠟꠐꠤ
- Sakizaya
- தமிழ்
- ᥖᥭᥰ ᥖᥬᥲ ᥑᥨᥒᥰ
- తెలుగు
- тоҷикӣ
- ไทย
- ትግርኛ
- Tagalog
- Türkçe
- татарча / tatarça
- тыва дыл
- удмурт
- українська
- اردو
- oʻzbekcha / ўзбекча
- vèneto
- vepsän kel’
- Tiếng Việt
- 吴语
- მარგალური
- Yorùbá
- Vahcuengh
- 文言
- 閩南語 / Bân-lâm-gí
- 粵語
This template normalises an input to be a yes/no output.
Usage
The template has five possible outputs depending on the default parameter (input if you will).
In its simplest usage, these will all be either "yes" or "" (blank = nothing no characters).
- {{Yesno|yes}} → "yes" (also applies to "Yes", "YeS", etc, "Y", "y" and "1")
- {{Yesno|no}} → "" (also applies to "No", "NO", "nO", "N", "n" and "0")
- {{Yesno}} → ""
- {{Yesno|¬}} → ""
- {{Yesno|purplemonkeydishwasher}} → "yes" (also applies to any other value not given above)
Each of these can be over-ridden.
- {{Yesno|yes|yes=bacon}} → "bacon" (also applies to "Yes", "YeS", etc, "Y", "y" and "1")
- {{Yesno|no|no=ham}} → "ham" (also applies to "No", "NO", "nO", "N", "n" and "0")
- {{Yesno|blank=eggs}} → "eggs"
- {{Yesno|¬|¬=sausage|blank=eggs|no=ham}} → "sausage"
- and {{Yesno|¬=sausage|blank=eggs|no=ham}} → "sausage"
- {{Yesno|purplemonkeydishwasher|def=cup-of-tea}} → "{{Yesno|purplemonkeydishwasher|def=cup-of-tea}}" (also applies to any other value not given above)
This may be used (apparently perversely) thus:
This creates a logical inversion.
TemplateData
This is the TemplateData documentation for this template used by VisualEditor and other tools.
Yesno
This template normalises an input to be a yes or nil output.
Parameter | Description | Type | Status | |
---|---|---|---|---|
Input value | 1 | The value to be evaluated. | String | required |
Output on yes | yes | Specifies the output of the template when the input value is a case-insensitive forms of 'Yes', 'Y', 'True' or '1'. | String | optional |
Output on no | no | Specifies the output of the template when the input value is a case-insensitive forms of 'No', 'N', 'False', or '0'. | String | optional |
Output on blank input | blank | Specifies the output of the template when the input value is defined but is either empty or contains nothing but whitespace character(s). | String | optional |
Output on ¬ | ¬ | Specifies the output of the template when the input value is either '¬' or entirely missing (undefined). | String | optional |
Definite output | def | Specifies the output of the template when the input value is defined but not a form of 'yes', 'no', '1', '0', '¬' or blank. | String | optional |
See also
Editors can experiment in this template’s sandbox (create | mirror) and testcases (create) pages.
Please add categories to the /doc subpage. Subpages of this template.