diff options
author | Steven Barth <steven@midlink.org> | 2008-06-28 16:03:54 +0000 |
---|---|---|
committer | Steven Barth <steven@midlink.org> | 2008-06-28 16:03:54 +0000 |
commit | 00aceaf624d8e5da2a8f3df161d52599aae2ac41 (patch) | |
tree | c18d8c411f8d4a02762a478348fd8a86b4f56f5a /libs/web/luasrc/i18n.lua | |
parent | 7f56bf947599b20e2cf50018e160e602d5516e5f (diff) |
* libs/web: Switched from HTTP-Basic-Auth to Session-Auth
* Updated Makefiles for better testing environment integration
* Fixed libs/sgi-luci
Diffstat (limited to 'libs/web/luasrc/i18n.lua')
-rw-r--r-- | libs/web/luasrc/i18n.lua | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/libs/web/luasrc/i18n.lua b/libs/web/luasrc/i18n.lua index 35ad0965d0..2c2bb2e1a2 100644 --- a/libs/web/luasrc/i18n.lua +++ b/libs/web/luasrc/i18n.lua @@ -71,10 +71,10 @@ function setlanguage(lang) end -- Returns the i18n-value defined by "key" or if there is no such: "default" -function translate(key, default) +function translate(key, def) return (table[context.lang] and table[context.lang][key]) or (table[default] and table[default][key]) - or default + or def end -- Translate shourtcut with sprintf/string.format inclusion |