汉化一下下松鼠邮件系统SquirrelMail
来源:互联网 发布:华东理工网络学生平台 编辑:程序博客网 时间:2024/04/26 06:16
架设了一个邮件服务器,使用SquirrelMail做为web平台,发现它的Drafts、Sent、Trash三个邮箱名还是英文的,太不专业了吧。上网查帮助,它在sourceforge的官方留言板上对这个问题回答如下:
3> how do I translate the "trash/sent/drafts" into
> Chinese (simplified), since there seems no entries for
> them in .po file.
This must be changed at configuration level. Go to conf.pl and change
the default folders names to whatever you like. This cannot be changed
with po because it depends on the IMAP server. The only folder that can
be renamed is the INBOX wich is a "system" name.
> Chinese (simplified), since there seems no entries for
> them in .po file.
This must be changed at configuration level. Go to conf.pl and change
the default folders names to whatever you like. This cannot be changed
with po because it depends on the IMAP server. The only folder that can
be renamed is the INBOX wich is a "system" name.
在另外一个论坛上,有个老外直接了当地回答说,这个问题是无法解决的。哼哼,我就不信改不过来~看我的:
因为左边的邮箱目录在left_main.php中,我打开它,增加一个function
// --Add by Anjo, 2006.9.3
function rename_subbox($mailboxstr, $oldname, $newname) {
$len0=strlen($mailboxstr);
$len1=strlen($oldname);
if (strpos($mailboxstr, $oldname, $len0-$len1)==$len0-$len1) {
return substr($mailboxstr, 0, $len0-$len1).$newname;
}
else
return $mailboxstr;
}
// --end of Anjo's function
function rename_subbox($mailboxstr, $oldname, $newname) {
$len0=strlen($mailboxstr);
$len1=strlen($oldname);
if (strpos($mailboxstr, $oldname, $len0-$len1)==$len0-$len1) {
return substr($mailboxstr, 0, $len0-$len1).$newname;
}
else
return $mailboxstr;
}
// --end of Anjo's function
然后找到这一段
if ($special_color) {
$line .= "<font color=/"$color[11]/">";
}
if ( $mailbox == 'INBOX' ) {
$line .= _("INBOX");
} else {
$line .= str_replace(array(' ','<','>'),array(' ','<','>'),$mailbox);
}
在它后面加上:
//-- By Anjo, for translate "Drafts", "Sent" and "Trush"
$line = rename_subbox($line, "Drafts", "草稿箱");
$line = rename_subbox($line, "Sent", "发件箱");
$line = rename_subbox($line, "Trash", "回收站");
- 汉化一下下松鼠邮件系统SquirrelMail
- SquirrelMail 汉化
- SquirrelMail 汉化
- squirrelmail 小松鼠的安装和配置
- 配置postfix+dovecot+mysql+postfixadmin+squirrelmail 邮件系统笔记
- SquirrelMail
- 在ubuntu下用squirrelmail架设webmail
- Windows 2003 下 SquirrelMail 的安装
- Linux下的邮件系统概述
- Linux下的邮件系统概述
- 邮件系统
- 邮件系统
- 邮件系统
- 邮件系统
- 邮件系统
- 邮件系统
- 邮件系统
- 邮件系统
- Sales Order
- Windows Sever 2008 终极瘦身技巧
- SAP GUI for HTML
- java中数据类型转换 Integer String Long Float Double Date
- 如何缩小SQL SERVER日志文件
- 汉化一下下松鼠邮件系统SquirrelMail
- 封杀Windows系统漏洞堵住黑客入侵途径
- div 竖向三级弹出菜单
- 我所理解的SAP事件
- 暂时换回Windows
- 流行技术我该学哪样?--给刚进入IT的朋友的一封信
- BDC的写法
- 软件测试职业发展(转)
- 参数修饰符ref,out ,params的区别