summaryrefslogtreecommitdiffhomepage
path: root/libs/web/luasrc
diff options
context:
space:
mode:
authorJo-Philipp Wich <jow@openwrt.org>2012-12-02 13:30:46 +0000
committerJo-Philipp Wich <jow@openwrt.org>2012-12-02 13:30:46 +0000
commit7c3c6b013b26ca45a06f140083131195a7807bb6 (patch)
tree3f5e0d7637207d252577a1d7f003d37f3c7e8133 /libs/web/luasrc
parentc97ef199d64861c07cc7798cf4f6d28f7ef5cde3 (diff)
libs/web: let luci.i18n.setlanguage() return the lang that was actually loaded
Diffstat (limited to 'libs/web/luasrc')
-rw-r--r--libs/web/luasrc/i18n.lua2
1 files changed, 2 insertions, 0 deletions
diff --git a/libs/web/luasrc/i18n.lua b/libs/web/luasrc/i18n.lua
index ff917c6f38..545a8aed93 100644
--- a/libs/web/luasrc/i18n.lua
+++ b/libs/web/luasrc/i18n.lua
@@ -63,8 +63,10 @@ function setlanguage(lang)
if not tparser.load_catalog(context.lang, i18ndir) then
if context.parent then
tparser.load_catalog(context.parent, i18ndir)
+ return context.parent
end
end
+ return context.lang
end
--- Return the translated value for a specific translation key.