logo

Module:Documentation/functions/zh_dial_or_syn是什么意思_Module:Documentation/functions/zh_dial_or_syn读音|解释_Module:Documentation/functions/zh_dial_or_syn同义词|反义词

Module:Documentation/functions/zh_dial_or_syn



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 = "发音"
			where = "方言"
		elseif type_of_data == "syn" then
			what = "近义词"
			where = "方言与变体"
		end
		
		if what then
			local link = require("Module:Links").full_link{
				lang = require "Module:Languages".getByCode("zh"),
				term = character,
			}
			return ("本-{zh-hans:模块;zh-hant:模組}-包含%s在汉语各%s上的%s。")
				:format(link, where, what)
		end
	end
end