看了网上的别家配置笔记内容已经过时,汉化无效,还是翻阅了最新官方中文文档才知道应该按如下配置
安装中文包只需要三步:
XLPage('zh-cn.utf8','PmWikiZhCn.XLPage');
设置时区,和汉化后“最后修改时间乱码的修正”,在config.php中添加如下代码:
date_default_timezone_set('Asia/Shanghai');#设置时区为亚洲上海
$TimeFmt = '%F %H:%M'
更多时间格式设置参考链接:https://www.pmwiki.org/wiki/PmWiki/BasicVariables#TimeFmt
最后来一个完整的带汉化的config.php配置参考
<?php if (!defined('PmWiki')) exit();
$WikiTitle = 'MyWiki';
$DefaultPasswords['admin'] = pmcrypt('123');
include_once("scripts/xlpage-utf-8.php");
XLPage('zh-cn.utf8','PmWikiZhCn.XLPage');
$EnableGUIButtons = 1;
$EnableUpload = 1;
$DefaultPasswords['upload'] = pmcrypt('123');
$UploadPermAdd = 0; # Recommended for most new installations
date_default_timezone_set('Asia/Shanghai');#设置时区为亚洲上海
$TimeFmt = '%F %H:%M';
$UploadNameChars = "-\w. \x80-\xff";#中文附件