15 附加前端语言

概述

要在Zabbix网页界面中使用英语以外的其他语言,必须在Web服务器上安装相应的语言环境。此外,还需要PHP gettext扩展才能使翻译功能正常工作。

安装区域设置

要列出所有已安装的语言,run:

locale -a

如果所需语言未列出,请打开 /etc/locale.gen file 并取消注释所需的区域设置。由于Zabbix 使用UTF-8编码,需选择带有UTF-8字符集的区域设置。

现在,run:

locale-gen 

重启Web服务器。

区域设置现在应已安装。可能需要使用Ctrl + F5在浏览器中重新加载Zabbix 前端页面以使新语言显示。

安装Zabbix

如果直接从Zabbix git repository安装Zabbix, 则需要手动生成翻译文件。要generate翻译 文件,请run:

make gettext
       locale/make_mo.sh

当从软件包或源代码tar.gz文件安装Zabbix时, 不需要此步骤。

选择语言

在Zabbix网页界面中有多种选择语言的方式:

  • 安装网页界面时 - 在前端欢迎屏幕中选择。所选语言将被设置为系统默认语言。

  • 安装完成后,系统默认语言可在管理→常规→GUI 图形用户界面中修改。

  • 特定用户的语言可在[user

    profile](/manual/web_interface/user_profile#user_profile).

If a locale for a language is not installed on the machine, this language will be greyed out in Zabbix language selector. A red icon is displayed next to the language selector if at least one locale is missing. Upon pressing on this icon the following message will be displayed: "You are not able to choose some of the languages, because locales for them are not installed on the web server."

locale_warning.png中更改