Module:Translations: Difference between revisions

From Cassette Beasts
Solari (talk | contribs)
No edit summary
Solari (talk | contribs)
i THINK we're ready
Line 2: Line 2:


local translations = mw.text.jsonDecode(mw.title.new('Data:Translations'):getContent())
local translations = mw.text.jsonDecode(mw.title.new('Data:Translations'):getContent())
function p.example(frame)
return translations[frame.args[1]]['es_MX']
end


function p.get_tl(frame)
function p.get_tl(frame)

Revision as of 21:09, 14 July 2025

Documentation for this module may be created at Module:Translations/doc

local p = {}

local translations = mw.text.jsonDecode(mw.title.new('Data:Translations'):getContent())

function p.get_tl(frame)
	return translations[frame.args[1]][frame.args[2]]
end

return p