Module:term
From SUALEX
Documentation for this module may be created at Module:term/doc
-- Module:term
local p = {}
function p.invoke(frame)
local utilities = require("Module:utilities")
local format = require("Module:format")
local args = frame.args or {}
local param = args[1] or ""
local gloss_pref = args.gloss or "en" -- "en" default
local parts = utilities.split_string(param, ":")
local lang_code = parts[1]
local item = parts[2]
local display = parts[4]
local homonym = parts[3] or (item and item:match("#(.+)$"))
item = item and item:gsub("#.+$", "") or ""
return format.render_term(lang_code, item, homonym, display, nil, nil, gloss_pref)
end
return p