Jump to content

Module:ArticleSize

From Wikipedia, the free encyclopedia
local p = {}

function p.size(frame)
    local title = frame.args[1] or mw.title.getCurrentTitle().text
    local page = mw.title.new(title)
    local content = page and page:getContent() or ""
    local size = #content
    return mw.language.getContentLanguage():formatNum(size)
end

return p