跳转到内容

模組:VariantTest

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

这是Module:VariantTest当前版本,由Amire80留言 | 贡献编辑于2014年9月26日 (五) 18:43 (sub)。这个网址是本页该版本的固定链接。

(差异) ←上一修订 | 最后版本 (差异) | 下一修订→ (差异)
-- This is a test of variant handling.

local this = {}

function this.getVariant(frame)
	variant = frame:preprocess('-{zh-hans:Simplified;zh-hant:Traditional;}-')
	
	-- Get only a part of the result, so that the final page won't parse
	-- everything as a language converter clause
	return string.sub(variant, 2, 3)
end

return this