Jump to content

މޮޑިއުލް:Faruma title

ވިކިޕީޑިއާ، މިނިވަން އެކުމާފާނުން
Documentation icon މޮޑިއުލް ޑޮކިއުމަންޓޭޝަން[create]
local p = {}

function p.main(frame)
    local title = mw.title.getCurrentTitle()

    -- Apply Faruma font to the title
    local result = '<span class="faruma-font">' .. mw.text.nowiki(title.text) .. '</span>'

    -- Add the namespace if we're not in mainspace.
    if title.namespace ~= 0 then
        result = mw.site.namespaces[title.namespace].name .. ':' .. result
    end

    -- Call displaytitle with the text we generated.
    return mw.getCurrentFrame():callParserFunction('DISPLAYTITLE', result)
end

return p