跳转到内容

模組:VariantTest

维基百科,自由的百科全书
-- 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