मॉड्यूल:User:Victar/term cognates/templates
दिखावट
"इस मॉड्यूल हेतु प्रलेख मॉड्यूल:User:Victar/term cognates/templates/doc पर बनाया जा सकता है"
local export = {}
local m_languages = require("Module:languages")
function export.show(frame)
local params = {
[1] = {required = true, default = "gem-pro"},
[2] = {required = true, default = "*fuhsaz"},
}
local args
if frame.args[1] then
args = require("Module:parameters").process(frame.args, params)
else
args = require("Module:parameters").process(frame:getParent().args, params)
end
local lang = args[1]
local term = args[2]
lang = m_languages.getByCode(lang)
or require("Module:etymology languages").getByCode(lang)
or m_languages.err(lang, 1)
local entryLang = require("Module:etymology").getNonEtymological(lang)
if lang:getCode() ~= entryLang:getCode() then
-- [[Special:WhatLinksHere/Template:tracking/descendant/etymological]]
require("Module:debug").track("descendant/etymological")
require("Module:debug").track("descendant/etymological/" .. lang:getCode())
end
local cognates = require("Module:User:Victar/term cognates").getCognates(entryLang, term)
return cognates
end
return export