安装LuCI语言包:
-
LuCI ---> Modules ---> Translations --->
-
English (en)
-
Chinese (zh-cn)
-
Taiwanese (zh-tw)
修改源配置文件
feeds/luci/modules/luci-base/root/etc/config/luci
改后内容如下:
-
config core main
-
option lang zh_cn
-
option mediaurlbase /luci-static/openwrt.org
-
option resourcebase /luci-static/resources
-
-
config extern flash_keep
-
option uci "/etc/config/"
-
option dropbear "/etc/dropbear/"
-
option openvpn "/etc/openvpn/"
-
option passwd "/etc/passwd"
-
option opkg "/etc/opkg.conf"
-
option firewall "/etc/firewall.user"
-
option uploads "/lib/uci/upload/"
-
-
config internal languages
-
-
config internal sauth
-
option sessionpath "/tmp/luci-sessions"
-
option sessiontime 3600
-
-
config internal ccache
-
option enable 1
-
-
config internal themes
make V=99
编译好的镜像烧写入开发板,进入Web页面即可
OpenWrt中安装LuCI软件包后的WEB界面默认是不带中文包的。如下:

即使我们进入System->System->Language and Style界面:
也并没有其他语言选项可供选择。
这是因为固件在编译的时候,并没有把语言包编译进去。
接下来我们重新编译固件,安装语言包。(此方法针对开发者,用户想要安装语言包请使用其他方法。)
-
进入openwrt/trunks目录执行shell命令




之后选择Save,退出菜单。
接下来进入
~/openwrt/trunk/feeds/luci/modules/luci-base/root/etc/config$
目录,编辑luci文件:
即可将默认语言设置成中文。(上述代码option lang zh_cn
将语言默认设置为中文,config internal languages
则是列出可选择的语言项。)
后保存,进入目录~/openwrt/trunk
执行shell命令:
烧写后我们就可以看到中文界面了:

make menuconfig
config core main
option lang zh_cn
option mediaurlbase /luci-static/openwrt.org
option resourcebase /luci-static/resources
config internal languages
option zh_cn chinese
option en English
make V=99