2 LuCI - Lua Configuration Interface
4 Copyright 2008 Steven Barth <steven@midlink.org>
6 Licensed under the Apache License, Version 2.0 (the "License");
7 you may not use this file except in compliance with the License.
8 You may obtain a copy of the License at
10 http://www.apache.org/licenses/LICENSE-2.0
15 local fs = require "nixio.fs"
16 local i18n = require "luci.i18n"
17 local util = require "luci.util"
18 local config = require "luci.config"
20 m = Map("system", translate("System"))
22 s = m:section(TypedSection, "system", "")
26 hn = s:option(Value, "hostname", translate("Hostname"))
30 m2 = Map("luci", translate("Web <abbr title=\"User Interface\">UI</abbr>"))
33 c = m2:section(NamedSection, "main", "core")
35 l = c:option(ListValue, "lang", translate("Language"))
38 local i18ndir = i18n.i18ndir .. "default."
39 for k, v in util.kspairs(config.languages) do
40 local file = i18ndir .. k:gsub("_", "-")
41 if k:sub(1, 1) ~= "." and fs.access(file .. ".lmo") then