From 8f770fd17a561f9e7eecf0b415abb9bb5101cb94 Mon Sep 17 00:00:00 2001 From: Steven Barth Date: Sun, 6 Jul 2008 15:19:26 +0000 Subject: * libs/web: Fixed translation handling --- modules/admin-core/luasrc/model/cbi/admin_index/luci.lua | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'modules') diff --git a/modules/admin-core/luasrc/model/cbi/admin_index/luci.lua b/modules/admin-core/luasrc/model/cbi/admin_index/luci.lua index f7616610b4..be4b08cf53 100644 --- a/modules/admin-core/luasrc/model/cbi/admin_index/luci.lua +++ b/modules/admin-core/luasrc/model/cbi/admin_index/luci.lua @@ -18,8 +18,12 @@ m = Map("luci", translate("webui"), translate("a_i_luci1", c = m:section(NamedSection, "main", "core", translate("general")) l = c:option(ListValue, "lang", translate("language")) + +local i18ndir = luci.i18n.i18ndir .. "default." for k, v in pairs(luci.config.languages) do - if k:sub(1, 1) ~= "." then + if k:sub(1, 1) ~= "." + and (luci.fs.isfile(i18ndir .. k .. ".lua") + or luci.fs.isfile(i18ndir .. k)) then l:value(k, v) end end -- cgit v1.2.3