Module:Lang: Difference between revisions

No edit summary
swapped argument order
Line 13: Line 13:
-- Get a localized string by the raw key
-- Get a localized string by the raw key
p.get_string = function(frame)
p.get_string = function(frame)
local lang_code = frame.args[1]
local key = frame.args[1]
local key = frame.args[2]
local lang_code = frame.args[2]
local data = get_lang_file(lang_code)
local data = get_lang_file(lang_code)
Line 31: Line 31:
-- Search for a localized string using its English label
-- Search for a localized string using its English label
p.search_string = function(frame)
p.search_string = function(frame)
local lang_code = frame.args[1]
local key = frame.args[1]
local attr_key = frame.args[2]
local lang_code = frame.args[2]
local data = get_lang_file(lang_code)
local data = get_lang_file(lang_code)
end
end


return p
return p