Zabbix 5.0切换中文语言小结
最近测试Zabbix 5.0,去修改语言时发现不能选择 “ Chinese(zh_CN) ” ,这个选项在下拉框中是灰色的(无法选择)。提示 “ You are not able to choose some of the languages, because locales for them are not installed on the web server. ” , 操作系统为CentOS Linux release 8.1.1911 (Core) 从旁边的提示信息判断,可能是Web服务器没有安装中文包,但是也有可能Zabbix把对中文的支持给关闭了,所以我们先检查一下php代码,找到/usr/share/zabbix/include/下的locales.inc.php文件 如上所示,Zabbix是允许你选择 “ Chinese(zh_CN) ” 选项的,那么可能是没有安装中文包,那么接下来,我们来检查一下这台服务器是否安装中文包。 # locale -a | grep "zh_CN" 输出为空,那么可以判断这台服务器没有安装中文包,下面来安装。 查找有哪些语言安装包 #yum search langpacks 安装中文语言包有下面两种方式 #yum install langpacks-zh_CN.noarch #dnf install langpacks-zh_CN