Difference between revisions of "Module:Template translation"

Jump to navigation Jump to search
default to English to avoid showing the <translate> tags
en>Guillom
(name is a string, and is in args)
en>Guillom
(default to English to avoid showing the <translate> tags)
Line 1: Line 1:
-- THIS IS A WORK IN PROGRESS. DO NOT USE.
-- THIS IS ALPHA CODE. USE CAREFULLY.


local p = {}
local p = {}
Line 12: Line 12:
      
      
     local template = frame.args['template']
     local template = frame.args['template']
     local langcode = ''
     local langcode = '/en'
      
      
     -- Get the last subpage
     -- Get the last subpage
Line 32: Line 32:
     return frame:expandTemplate{ title = template..langcode, args = frame.args }
     return frame:expandTemplate{ title = template..langcode, args = frame.args }
      
      
end
function p.debug (frame)
    return frame:expandTemplate{ title = frame.args['template'], args = frame.args }
end
end


return p
return p
Anonymous user

Navigation menu