Module:Case: Difference between revisions
Jump to navigation
Jump to search
(didn't notice there was a ucfirst built-in function) |
(fixed?) |
||
Line 4: | Line 4: | ||
return "[[" .. frame.args.link .. "|" .. string.lower(frame.args.link) .. "]]" | return "[[" .. frame.args.link .. "|" .. string.lower(frame.args.link) .. "]]" | ||
end | end | ||
langObject = mw.getLanguage( 'simple' ) | |||
function p.uppercase_first_letter(frame) | function p.uppercase_first_letter(frame) | ||
return "[[" .. frame.args.link .. "|" .. | return "[[" .. frame.args.link .. "|" .. langObject:ucfirst(frame.args.link) .. "]]" | ||
end | end | ||
return p | return p |
Revision as of 21:33, 22 May 2021
See usage on Script error: The function "title_case" does not exist., Template:U, and template:l.
local p = {} --p stands for package
function p.lowercase(frame)
return "[[" .. frame.args.link .. "|" .. string.lower(frame.args.link) .. "]]"
end
langObject = mw.getLanguage( 'simple' )
function p.uppercase_first_letter(frame)
return "[[" .. frame.args.link .. "|" .. langObject:ucfirst(frame.args.link) .. "]]"
end
return p