local export = {}
function export.code(code, paramForError, allowEtymLang, allowFamily)
local codetext = nil
if allowEtymLang and allowFamily then
codetext = "語言、詞源語言或語系代碼"
elseif allowEtymLang then
codetext = "語言或詞源語言代碼"
elseif allowFamily then
codetext = "語言或語系代碼"
else
codetext = "語言代碼"
end
require("Module:languages/error")(code, paramForError, codetext)
end
function export.canonicalName(name, allowEtymLang, allowFamily)
local text
if allowEtymLang and allowFamily then
text = "語言、詞源語言或語系代碼"
elseif allowEtymLang then
text = "語言或詞源語言代碼"
elseif allowFamily then
text = "語言或語系代碼"
else
text = "語言代碼"
end
error(text .. " \"" .. name .. "\" 無效。")
end
return export