Module:Lang: Difference between revisions

Sur (talk | contribs)
m get_string_fallback
Added lang override for _get_string
Line 55: Line 55:


-- get_string, but for internal use by other modules
-- get_string, but for internal use by other modules
p._get_string = function(key)
p._get_string = function(key, lang_override)
lang_code = get_lang_code()
lang_code = get_lang_code()


local data = get_lang_file(lang_code)
local data = get_lang_file(lang_override or lang_code)
if (data == nil) then
if (data == nil) then
return nil
return nil