Difference between revisions of "Module:Documentation/config"

Undo revision 4731975 by Tacsipacsi (talk): I wanted to do this in the sandbox
>Tacsipacsi
(use UI language in module namespace)
>Tacsipacsi
(Undo revision 4731975 by Tacsipacsi (talk): I wanted to do this in the sandbox)
 
Line 8: Line 8:
----------------------------------------------------------------------------------------------------
----------------------------------------------------------------------------------------------------


local tnt = require('Module:TNT')
local _format = require('Module:TNT').format
local format
local function format(id)
if mw.title.getCurrentTitle().namespace == 828 then
return _format('I18n/Documentation', id)
local lang = mw.getCurrentFrame():callParserFunction('int', 'lang')
format = function (id)
return tnt.formatInLanguage(lang, 'I18n/Documentation', id)
end
else
format = function (id)
return tnt.format('I18n/Documentation', id)
end
end
end


Anonymous user