From: Jo-Philipp Wich Date: Sun, 2 Dec 2012 13:30:46 +0000 (+0000) Subject: libs/web: let luci.i18n.setlanguage() return the lang that was actually loaded X-Git-Url: http://git.lede-project.org./?a=commitdiff_plain;h=7c3c6b013b26ca45a06f140083131195a7807bb6;p=project%2Fluci.git libs/web: let luci.i18n.setlanguage() return the lang that was actually loaded --- 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.