2 LuCI - Lua Configuration Interface
4 Copyright 2008 Steven Barth <steven@midlink.org>
5 Copyright 2008 Jo-Philipp Wich <xm@leipzig.freifunk.net>
7 Licensed under the Apache License, Version 2.0 (the "License");
8 you may not use this file except in compliance with the License.
9 You may obtain a copy of the License at
11 http://www.apache.org/licenses/LICENSE-2.0
15 require("luci.config")
16 m = Map("luci", translate("webui"), translate("a_i_luci1"))
18 -- force reload of global luci config namespace to reflect the changes
19 function m.commit_handler(self)
20 package.loaded["luci.config"] = nil
21 require("luci.config")
25 c = m:section(NamedSection, "main", "core", translate("general"))
27 l = c:option(ListValue, "lang", translate("language"))
30 local i18ndir = luci.i18n.i18ndir .. "default."
31 for k, v in pairs(luci.config.languages) do
32 local file = i18ndir .. k:gsub("_", "-")
33 if k:sub(1, 1) ~= "." and (
34 luci.fs.access(file .. ".lua") or
35 luci.fs.access(file .. ".lua.gz")
41 t = c:option(ListValue, "mediaurlbase", translate("design"))
42 for k, v in pairs(luci.config.themes) do
43 if k:sub(1, 1) ~= "." then