Changes

Module:Yesno

31 bytes added, 03:43, 27 April 2015
recognise "t" for true and "f" for false, per request
-- Function allowing for consistent treatment of boolean-like wikitext input.
-- It works similarly to the template {{yesno}}.
return function (val, default)
-- If your wiki uses non-ascii characters for any of "yes", "no", etc., you
or val == 'y'
or val == 'true'
or val == 't'
or tonumber(val) == 1
then
or val == 'n'
or val == 'false'
or val == 'f'
or tonumber(val) == 0
then
Anonymous user