Template:Yesno
This page has been put into protection by a PZwiki administrator.
Only users in the sysop user group may edit this page.
This template normalizes the input to a boolean value.
Usage
Parameters
1
Required- The value to be evaluated.
yes
- Specifies the output of the template when the input value is a case-insensitive forms of
yes
,y
,true
or1
. no
- Specifies the output of the template when the input value is a case-insensitive forms of
no
,n
,false
or0
. blank
- Specifies the output of the template when the input value is defined but is either empty or contains nothing but whitespace character(s).
def
- Specifies the output of the template when the input value is defined but not a form of
yes
,no
or blank.
Examples
Basic usage
Custom output
{{Yesno|yes|yes=bacon}}
-> "bacon"{{Yesno|no|no=ham}}
-> "ham"{{Yesno|blank=eggs}}
-> "eggs"{{Yesno|anythingelse|def=spam}}
-> "spam"
How to translate
This template doesn't need to/shouldn't be translated, but you can translate the documentation of this template with the following steps:
- Create a subpage of this template with the language code of the language you want to translate to.
- Copy the code wrapped in the
<noinclude>
tag in this template into the page you created.{{Translation guide}}
template should be removed from the translated documentation.
- Translate the page according to the translation requirements of normal pages.
See also
Editors can experiment in this template's sandbox.