mirror of
https://github.com/openwrt/luci.git
synced 2026-08-30 12:51:53 +04:00
libs/web: let luci.i18n.setlanguage() return the lang that was actually loaded
This commit is contained in:
@@ -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.
|
||||
|
||||
Reference in New Issue
Block a user