Module:languages/errorGetBy

Hello, you have come here looking for the meaning of the word Module:languages/errorGetBy. In DICTIOUS you will not only get to know all the dictionary meanings for the word Module:languages/errorGetBy, but we will also tell you about its etymology, its characteristics and you will know how to say Module:languages/errorGetBy in singular and plural. Everything you need to know about the word Module:languages/errorGetBy you have here. The definition of the word Module:languages/errorGetBy will help you to be more precise and correct when speaking or writing your texts. Knowing the definition ofModule:languages/errorGetBy, as well as those of other words, enriches your vocabulary and provides you with more and better linguistic resources.

This module needs documentation.
Please document this module by describing its purpose and usage on the documentation page.

local function get_text(allowEtymLang, allowFamily)
	local list = {"language"}
	if allowEtymLang then
		table.insert(list, "etymology language")
	end
	if allowFamily then
		table.insert(list, "family")
	end
	return mw.text.listToText(list, nil, " or ")
end

local export = {}

function export.code(code, paramForError, allowEtymLang, allowFamily)
	local text = get_text(allowEtymLang, allowFamily) .. " code"
	require("Module:languages/error")(code, paramForError, text)
end

function export.canonicalName(name, allowEtymLang, allowFamily)
	local text = get_text(allowEtymLang, allowFamily) .. " name"
	error("The " .. text .. " \"" .. name .. "\" is not valid.")
end

return export