Module:Dinl-utilities
Jump to navigation
Jump to search
Documentation for this module may be created at Module:Dinl-utilities/documentation
export = {}
m_links = require("Module:Links")
m_params = require("Module:Parameters")
lang = require("Module:Languages").getByCode("chak")
function export.dinl_link(text,alt,final,plain)
if final == nil then
final = "true"
end
if plain == nil then
plain = false
end
alt = alt or text
if final == "true" then
alt = alt.." "
end
if plain then
link_text = alt
else
link_text = m_links.full_link({term = text, alt = alt, lang = lang})
end
return '<span style="font-family: Chakobsa; font-weight:normal !important; font-size:160%;" >'..link_text..'</span>'
end
function export.show_dinl_link(frame)
params = {
[1] = {alias_of = "text"},
[2] = {alias_of = "final"},
["text"] = {},
["final"] = {type = "boolean"},
["alt"] = {},
}
args = m_params.process(frame:getParent().args,params)
if args["text"] then
return export.dinl_link(args["text"],args["alt"],args["final"])
else
local title = mw.title.getCurrentTitle()
local pagename = title.text
return export.dinl_link(pagename,nil,true,true)
end
end
return export