Module:etymology/templates/internal

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

This module is used by Module:etymology/templates and its submodules and is not meant to be used from anywhere else.


-- For internal use only with ] and its submodules.
local process_params = require("Module:parameters").process

local export = {}

do
	local function get_params(frame, has_text, no_family)
		local alias_of_t = {alias_of = "t"}
		local boolean = {type = "boolean"}
		local plain = {}
		local params = {
			 = {
				required = true,
				type = "language",
				default = "und"
			},
			 = {
				required = true,
				sublist = true,
				type = "language",
				family = not no_family,
				default = "und"
			},
			 = plain,
			 = {alias_of = "alt"},
			 = alias_of_t,
			
			 = plain,
			 = plain,
			 = {list = true},
			 = alias_of_t,
			 = plain,
			 = plain,
			 = plain,
			 = plain,
			 = plain,
			 = plain,
			 = {type = "script"},
			 = plain,
	
			 = boolean,
			 = plain,
			 = plain,
		}
		if has_text then
			params = boolean
			params = boolean
		end
		return process_params(frame:getParent().args, params)
	end
	
	function export.parse_2_lang_args(frame, has_text, no_family)
		local args = get_params(frame, has_text, no_family)
		local sources = args
		return args, args, {
			lang = sources,
			sc = args,
			term = args,
			alt = args,
			id = args,
			genders = args,
			tr = args,
			ts = args,
			gloss = args,
			pos = args,
			lit = args
		}, #sources > 1 and sources or nil
	end
end

return export