Anonymous user
Module:Template translation: Difference between revisions
m
should be like this, i hope
m (should be like this, i hope) |
|||
Line 33:
(added for backward compatibility of Template:TNT)
]]
local namespace = 'Template'
if (frame.args['namespace']~='')--checks for namespace parameter for custom ns
local templateFullTitle = mw.title.new(template, namespace)▼
then
if (templateFullTitle.id == 0)▼
else--supposes that set page is in ns10
namespace = ''▼
▲ local templateFullTitle = mw.title.new(template, namespace)
▲ if (templateFullTitle.id == 0)
then -- not found in the Template namespace, assume the main namespace
▲ namespace = ''
end
end
-- Get the last subpage and check if it matches a known language code
local langcode = 'en' -- default language template subpage to render
|