Module:Lang: Difference between revisionsGive feedback
m bugfix with 'dictionary' fallback option |
m Default search string to input label if none is found |
||
| Line 101: | Line 101: | ||
if (data_lang == nil) then | if (data_lang == nil) then | ||
error("Lang code '%s' does not have a json file", lang_code) | |||
end | end | ||
| Line 113: | Line 113: | ||
end | end | ||
-- Default to input label if localized string is not found | |||
if (key == nil) then | if (key == nil) then | ||
return | return label | ||
end | end | ||
if (data_lang[key] == nil) then | if (data_lang[key] == nil) then | ||
return label | return label | ||