Module:auto cat

From Laenkea
Revision as of 08:04, 6 August 2023 by Maria (talk | contribs) (Created page with "local export = {} local function get_language(title) local find_by_name = require("Module:languages").find_by_name local language local words = mw.text.split(title, " ") for i = 1, #words do name = table.concat(words, " ", 1, i) language = find_by_name(name) if language then break end end return language end return export")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search
local export = {}

local function get_language(title)
	local find_by_name = require("Module:languages").find_by_name
	local language
	
	local words = mw.text.split(title, " ")
	for i = 1, #words do
		name = table.concat(words, " ", 1, i)
		language = find_by_name(name)
		if language then break end
	end
	return language
end

return export