Module:Lang: Difference between revisions

Sur (talk | contribs)
m _search_string testing
Added error handle for missing lang on search_string func
Line 65: Line 65:
local data_lang = get_lang_file(lang_code)  -- Target language data
local data_lang = get_lang_file(lang_code)  -- Target language data


if (data_lang == nil) then
return string.format("Lang code '%s' does not have a json file", lang_code)
end
-- Search for the key in the English data
-- Search for the key in the English data
local key = nil
local key = nil