跳转到内容

模組:Lang/sandbox

维基百科,自由的百科全书

这是本页的一个历史版本,由Vozhuo留言 | 贡献2019年8月13日 (二) 14:50 建立内容为“local function make_category (code, language_name, nocat) local cat = {}; if (0 ~= namespace) or nocat then -- only categorize in arti…”的新页面)编辑。这可能和当前版本存在着巨大的差异。

(差异) ←上一修订 | 最后版本 (差异) | 下一修订→ (差异)
local function make_category (code, language_name, nocat)
	local cat = {};
	
	if (0 ~= namespace) or nocat then											-- only categorize in article space
		return '';																-- return empty string for concatenation
	end
		
	table.insert (cat, '[[Category:含有');
	
	if 'zh' == code then
		table.insert (cat, '明確引用中文');
	elseif 'ko' == code then
		table.insert (cat, '朝鮮語')
	elseif (page_exists ('Category:含有' .. language_name .. '的條目') ) then
		table.insert (cat, language_name);
	else
		table.insert (cat, '非中文內容');
	end
	
	table.insert (cat, '的條目]]');

	return table.concat (cat);	
end