Modul:documentation/functions/zh dial or syn

A Wikiszótárból, a nyitott szótárból

A modult a Modul:documentation/functions/zh dial or syn/doc lapon tudod dokumentálni

return function(title, cats)
	local type_of_data, character = title.fullText:match("^Module:zh/data/dial%-(%l+)/(.+)$")
	if character then
		local what, where
		if type_of_data == "pron" then
			what = "the pronunciation"
			where = "dialects"
		elseif type_of_data == "syn" then
			what = "synonyms"
			where = "dialects and varieties"
		end
		
		if what then
			local link = require("Module:links").full_link{
				lang = require "Module:languages".getByCode("zh"),
				term = character,
			}
			return ("This module contains data on %s of %s in %s of Chinese.")
				:format(what, link, where)
		end
	end
end