عرض مصدر وحدة:Yesno
اذهب إلى التنقل
اذهب إلى البحث
ليست لك الصلاحية لتعديل هذه الصفحة; للسبب التالي:
يمكنك مطالعة و نسخ مصدر هذه الصفحة.
-- 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
-- should replace "val:lower()" with "mw.ustring.lower(val)" in the
-- following line.
val = type(val) == 'string' and val:lower() or val
if val == nil then
return nil
elseif val == true
or val == 'yes'
or val == 'نعم'
or val == 'y'
or val == 'true'
or val == 't'
or tonumber(val) == 1
then
return true
elseif val == false
or val == 'no'
000
1:0
القوالب المستخدمة في هذه الصفحة:
- قالب:Noprint (عدل)
- قالب:استبدل (عدل)
- قالب:استخدام واسع (عدل)
- قالب:صندوق رسالة أخرى (عدل)
- وحدة:Arguments (عدل)
- وحدة:Category handler (عدل)
- وحدة:Category handler/blacklist (عدل)
- وحدة:Category handler/config (عدل)
- وحدة:Category handler/data (عدل)
- وحدة:Category handler/shared (عدل)
- وحدة:Message box (عدل)
- وحدة:Message box/configuration (عدل)
- وحدة:Namespace detect/config (عدل)
- وحدة:Namespace detect/data (عدل)
- وحدة:No globals (عدل)
- وحدة:String (عدل)
- وحدة:Yesno (عدل)
- وحدة:Yesno/شرح (عدل)
ارجع إلى وحدة:Yesno.