Modul:documentation/functions/translit

A modult a Modul:documentation/functions/translit/doc lapon tudod dokumentálni

return function (title, cats)
	-- Check that the title begins in a language or script code.
	-- If so, expand {{translit module documentation}} with that code
	-- as the first parameter.
	local code = title.text:match("^([%l-]+)%-")
	
	if not (code and require("Module:languages").getByCode(code)) then
		code = title.text:match("^(%u%l%l%l)%-")
		if not require("Module:scripts").getByCode(code) then
			return
		end
	end
	
	return mw.getCurrentFrame():expandTemplate {
		title = "translit module documentation",
		args = { code },
	}
end