မာတိကာသို့ ခုန်သွားရန်

မော်ဂျူး:languages/errorGetBy

အဝ်ႏ ဝိစ်သိဉ်နရီ ကို

Documentation for this module may be created at မော်ဂျူး:languages/errorGetBy/doc

local export = {}

function export.code(code, paramForError, allowEtymLang, allowFamily)
	local codetext = nil
	if allowEtymLang and allowFamily then
		codetext = "language, etymology language or family code"
	elseif allowEtymLang then
		codetext = "language or etymology language code"
	elseif allowFamily then
		codetext = "language or family code"
	else
		codetext = "language code"
	end
	require("Module:languages/error")(code, paramForError, codetext)
end

function export.canonicalName(name, allowEtymLang, allowFamily)
	local text
	if allowEtymLang and allowFamily then
		text = "language, etymology language or family name"
	elseif allowEtymLang then
		text = "language or etymology language name"
	elseif allowFamily then
		text = "language or family name"
	else
		text = "language name"
	end
	error("The " .. text .. " \"" .. name .. "\" is not valid.")
end

return export