lang = lang or ""
if force or not loaded[lang] or not loaded[lang][file] then
local f = loadfile(i18ndir .. file .. "." .. lang .. ".lua")
- or loadfile(i18ndir .. file .. "." .. lang)
if f then
table[lang] = table[lang] or {}
setfenv(f, table[lang])
local i18ndir = luci.i18n.i18ndir .. "default."
for k, v in pairs(luci.config.languages) do
- if k:sub(1, 1) ~= "."
- and (luci.fs.isfile(i18ndir .. k .. ".lua")
- or luci.fs.isfile(i18ndir .. k)) then
+ if k:sub(1, 1) ~= "." and luci.fs.isfile(i18ndir .. k .. ".lua") then
l:value(k, v)
end
end