Template:Yesno

From Remilia Wiki
Jump to navigation Jump to search


Normalize common boolean spellings, with separate outputs for blank, missing and unrecognized inputs.

Usage

{{Yesno|off|yes=TRUE|no=FALSE}}/{{Yesno|true|yes=TRUE|no=FALSE}}/{{Yesno||blank=BLANK}}/{{Yesno|¬=MISSING}}/{{Yesno|unknown|def=OTHER}}

Accepted true values are yes, y, t, true, on and 1; false values are no, n, f, false, off and 0, ignoring case. The yes and no parameters replace their outputs. Blank, def and ¬ distinguish an explicitly blank, unrecognized or omitted input. Substitution remains supported.

Parameters

Normalize common boolean spellings, with separate outputs for blank, missing and unrecognized inputs.

Template parameters[Edit template data]

This template prefers inline formatting of parameters.

ParameterDescriptionTypeStatus
Content1

Value to normalize: yes/no, true/false, on/off, 1/0, or their one-letter forms.

Contentsuggested
Yesyes

Output for a true value; defaults to yes.

Contentoptional
Nono

Output for a false value; defaults to empty.

Contentoptional
Blankblank

Output for an explicitly blank input; defaults to the no output.

Contentoptional
Missing input¬

Output when the input is omitted; defaults to empty.

Contentoptional
Defdef

Output for an unrecognized value; defaults to the yes output.

Contentoptional