summaryrefslogtreecommitdiffhomepage
path: root/libs/web/luasrc/i18n.lua
diff options
context:
space:
mode:
authorSteven Barth <steven@midlink.org>2008-06-28 16:03:54 +0000
committerSteven Barth <steven@midlink.org>2008-06-28 16:03:54 +0000
commit00aceaf624d8e5da2a8f3df161d52599aae2ac41 (patch)
treec18d8c411f8d4a02762a478348fd8a86b4f56f5a /libs/web/luasrc/i18n.lua
parent7f56bf947599b20e2cf50018e160e602d5516e5f (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.lua4
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