diff options
author | Jo-Philipp Wich <jow@openwrt.org> | 2010-04-16 19:05:05 +0000 |
---|---|---|
committer | Jo-Philipp Wich <jow@openwrt.org> | 2010-04-16 19:05:05 +0000 |
commit | 4c4d9b869bfa05b7b75c649374b34355e739f12a (patch) | |
tree | 29640286ac251cbb3f06daf4e8309f3cbf9cf857 /libs/web | |
parent | 0b0c2e3c1a55c9626f36b330f283817fceded710 (diff) |
libs/web: don't fail if no langauge is set in luci config
Diffstat (limited to 'libs/web')
-rw-r--r-- | libs/web/luasrc/dispatcher.lua | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/libs/web/luasrc/dispatcher.lua b/libs/web/luasrc/dispatcher.lua index 5f48043c50..b79fdd38b9 100644 --- a/libs/web/luasrc/dispatcher.lua +++ b/libs/web/luasrc/dispatcher.lua @@ -149,7 +149,7 @@ function dispatch(request) assert(conf.main, "/etc/config/luci seems to be corrupt, unable to find section 'main'") - local lang = conf.main.lang + local lang = conf.main.lang or "auto" if lang == "auto" then local aclang = http.getenv("HTTP_ACCEPT_LANGUAGE") or "" for lpat in aclang:gmatch("[%w-]+") do @@ -159,7 +159,7 @@ function dispatch(request) break end end - end + end require "luci.i18n".setlanguage(lang) local c = ctx.tree |