Modul:languages/errorGetBy
Dokumentasi untuk modul ini dapat dibuat di Modul:languages/errorGetBy/doc
local function get_text(allowEtymLang, allowFamily)
local list = {"bahasa"}
if allowEtymLang then
table.insert(list, "bahasa etimologi")
end
if allowFamily then
table.insert(list, "keluarga")
end
return mw.text.listToText(list, nil, " atau ")
end
local export = {}
function export.code(code, paramForError, allowEtymLang, allowFamily)
local text = "kode " .. get_text(allowEtymLang, allowFamily)
require("Module:languages/error")(code, paramForError, text)
end
function export.canonicalName(name, allowEtymLang, allowFamily)
local text = "nama " .. get_text(allowEtymLang, allowFamily)
error(text .. " \"" .. name .. "\" tidak sah.")
end
return export