yujin2010good
作者yujin2010good2019-07-11 09:17
系统工程师, 大型零售巨头

ZABBIX修改主题和语言

字数 3301阅读 1244评论 0赞 1

修改中文语言('zh_CN' => ['name' => _('Chinese (zh_CN)'), 'display' => true],)
[root@python ~]# vim /usr/share/zabbix/include/locales.inc.php
**/
function init_mbstrings() {
$res = true;
$res &= extension_loaded('mbstring');

if (version_compare(PHP_VERSION, '5.6', '<')) {
ini_set('mbstring.internal_encoding', 'UTF-8');
$res &= (ini_get('mbstring.internal_encoding') === 'UTF-8');
}
else {
ini_set('default_charset', 'UTF-8');
$res &= (ini_get('default_charset') === 'UTF-8');
}

ini_set('mbstring.detect_order', 'UTF-8, ISO-8859-1, JIS, SJIS');
$res &= (ini_get('mbstring.detect_order') === 'UTF-8, ISO-8859-1, JIS, SJIS');

return $res;
}

/**

  • Returns a list of all used locales.
  • Each locale has the following properties:
    • name - the full name of the locale
    • display - whether to display the locale in the frontend
  • @return array an array of locales with locale codes as keys and arrays as values
    */
    function getLocales() {
    return [
    'en_GB' => ['name' => _('English (en_GB)'), 'display' => true],
    'en_US' => ['name' => _('English (en_US)'), 'display' => true],
    'bg_BG' => ['name' => _('Bulgarian (bg_BG)'), 'display' => false],
    'zh_CN' => ['name' => _('Chinese (zh_CN)'), 'display' => true],
    'zh_TW' => ['name' => _('Chinese (zh_TW)'), 'display' => false],
    'cs_CZ' => ['name' => _('Czech (cs_CZ)'), 'display' => true],
    'nl_NL' => ['name' => _('Dutch (nl_NL)'), 'display' => false],
    'fi_FI' => ['name' => _('Finnish (fi_FI)'), 'display' => false],
    'fr_FR' => ['name' => _('French (fr_FR)'), 'display' => true],
    'ka_GE' => ['name' => _('Georgian (ka_GE)'), 'display' => false],
    'de_DE' => ['name' => _('German (de_DE)'), 'display' => false],
    'el_GR' => ['name' => _('Greek (el_GR)'), 'display' => false],
    'hu_HU' => ['name' => _('Hungarian (hu_HU)'), 'display' => false],
    'id_ID' => ['name' => _('Indonesian (id_ID)'), 'display' => false],
    'it_IT' => ['name' => _('Italian (it_IT)'), 'display' => true],
    'ko_KR' => ['name' => _('Korean (ko_KR)'), 'display' => true],
    'ja_JP' => ['name' => _('Japanese (ja_JP)'), 'display' => true],
    'lv_LV' => ['name' => _('Latvian (lv_LV)'), 'display' => false],
    'lt_LT' => ['name' => _('Lithuanian (lt_LT)'), 'display' => false],
    'fa_IR' => ['name' => _('Persian (fa_IR)'), 'display' => false],
    'pl_PL' => ['name' => _('Polish (pl_PL)'), 'display' => true],
    'pt_BR' => ['name' => _('Portuguese (pt_BR)'), 'display' => true],
    'pt_PT' => ['name' => _('Portuguese (pt_PT)'), 'display' => false],
    'ro_RO' => ['name' => _('Romanian (ro_RO)'), 'display' => false],
    'ru_RU' => ['name' => _('Russian (ru_RU)'), 'display' => true],
    'sk_SK' => ['name' => _('Slovak (sk_SK)'), 'display' => true],
    'es_ES' => ['name' => _('Spanish (es_ES)'), 'display' => false],
    'sv_SE' => ['name' => _('Swedish (sv_SE)'), 'display' => false],
    'tr_TR' => ['name' => _('Turkish (tr_TR)'), 'display' => false],
    'uk_UA' => ['name' => _('Ukrainian (uk_UA)'), 'display' => true],
    'vi_VN' => ['name' => _('Vietnamese (vi_VN)'), 'display' => false]
    ];

}

修改主题

如果觉得我的文章对您有用,请点赞。您的支持将鼓励我继续创作!

1

添加新评论0 条评论

Ctrl+Enter 发表

作者其他文章

相关文章

相关问题

相关资料

X社区推广