Changes

Module:Template translation

41 bytes added, 10:24, 24 May 2013
name is a string, and is in args
This is aimed at replacing the current implementation of Template:TNT.
]]
local template = frame.args['template']
local langcode = ''
if ( mw.language.isKnownLanguageTag( subpage ) )
then
local translation = mw.title.new( frame[template]..'/'..subpage, 'Template' )
if ( translation.id ~= 0)
then
-- Render the template
return frame:expandTemplate{ title = frame[template]..langcode, args = frame.args }
end
function p.debug (frame)
return frame:expandTemplate{ title = frame.args['template'], args = frame.args }
end
return p
Anonymous user