模組: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