Changes

Module:Template translation

95 bytes removed, 12:03, 24 May 2013
\o/
--[[ If the subpage is a valid language code, check if a translation of the
template exists in that language; if so, put it in langcode . ]]
if ( mw.language.isKnownLanguageTag( subpage ) )
then
end
-- Render the template return frame:expandTemplate{ title = template..langcode, Copy args = frame.args } end  function p.debug(frame) pseudo-- Copy args table to a proper table so we can feed it to expandTemplate
local arguments = {}
for k, v in pairs( frame.args ) do
arguments[k] = v
end
 
-- Render the template
return frame:expandTemplate{ title = template..langcode, args = arguments }
return frame:expandTemplate{ title = frame.args['template'], args = arguments }
end
return p
Anonymous user