Module:Lang: Difference between revisions

no edit summary
No edit summary
No edit summary
Line 623:
 
args.italic = to_boolean(args.italic); -- convert to boolean or nil: 'yes' -> true, 'no' -> false; else nil
args.italic = validate_italic (args.italic); -- nil or font-style property value
 
if nil == args.italic then -- nil when |italic= absent or not set or |italic=default; args.italic controls
if 'latn' == subtags.script then -- script set to latn
-- args.italic = true; -- DEFAULT for {{lang}} templates is upright; but if latn script
args.italic = 'italic'; -- DEFAULT for {{lang}} templates is upright; but if latn script set for font-style:italic
else
-- args.italic = false; -- italic not set; script not latn
args.italic = 'normal'; -- italic not set; script not latn; set for font-style:normal
end
end
msg = validate_text ('lang', args); -- ensure that |text= is set (italic test disabled for the time being)
Anonymous user