Ubuntu 6.06 下SquirrelMail的中文界面问题

SquirrelMail的系统配置为中文,用户设置也是中文,可以正常查看中文邮件,但界面还是英文。

系统已经安装了language-support-zh中文支持包。

原因:Ubuntu的默认系统字符集是UTF-8,而SquirrelMail需要的是GB2312(见SquirrelMail的程序目录functions/i18n.php中第843到846行)

解决办法(从SquirrelMail官网的wiki里得到启示):

$ sudo cp /var/lib/locales/supported.d/local /var/lib/locales/supported.d/local.old
$ grep zh_CN /usr/share/i18n/SUPPORTED
zh_CN.GB18030 GB18030
zh_CN.GBK GBK
zh_CN.UTF-8 UTF-8
zh_CN GB2312

$ sudo vi /var/lib/locales/supported.d/local
把上面的内容添加到local文件里

$ grep zh_CN /var/lib/locales/supported.d/local
zh_CN.GB18030 GB18030
zh_CN.GBK GBK
zh_CN.UTF-8 UTF-8
zh_CN GB2312

$ sudo dpkg-reconfigure --force locales
生成新的中文locale,可能比较慢

这时访问SquirrelMail的界面就是中文的了。

Leave a Reply

Your email address will not be published. Required fields are marked *

*

To create code blocks or other preformatted text, indent by four spaces:

    This will be displayed in a monospaced font. The first four 
    spaces will be stripped off, but all other whitespace
    will be preserved.
    
    Markdown is turned off in code blocks:
     [This is not a link](http://example.com)

To create not a block, but an inline code span, use backticks:

Here is some inline `code`.
For more help see http://daringfireball.net/projects/markdown/syntax

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>