Difference between revisions of "Module:Documentation"

266 bytes removed ,  13:40, 31 July 2021
Undo revision 4731418 by Shirayuki (talk): templates on mediawiki.org use page language, not UI language, and it’s perfectly okay that way
>Shirayuki
(use translated config)
>Tacsipacsi
(Undo revision 4731418 by Shirayuki (talk): templates on mediawiki.org use page language, not UI language, and it’s perfectly okay that way)
 
Line 21: Line 21:


local function message(cfgKey, valArray, expectType)
local function message(cfgKey, valArray, expectType)
local frame = mw.getCurrentFrame()
local userlanguage = frame:callParserFunction{ name = 'int', args = {'lang'} }
if mw.title.new('Module:Documentation/config/' .. userlanguage).exists then
cfg = mw.loadData('Module:Documentation/config/' .. userlanguage)
end
--[[
--[[
-- Gets a message from the cfg table and formats it if appropriate.
-- Gets a message from the cfg table and formats it if appropriate.
Anonymous user