• FIRST SORRY FOR MY POOR ENGLISH!

    pfsense has installed lighttpd as webserver, php5 support gettext. I download the messages.po, edit for chinese, then in my pfsensebox, I open the file .cshrc in order to support chinese, I add  follow
    setenv  LANG        zh_CN.eucCN
    setenv  MM_CHARSET    eucCN
    setenv  LC_ALL        zh_CN.eucCN
    setenv  LC_CTYPE        zh_CN.eucCN

    After that, I put the a test.php file in /usr/local/www, like this
    putenv('LANG=zh_CN');
    setlocale(LC_ALL, 'zh_CN');
    bindtextdomain(messages, '/usr/local/www/language');
    textdomain(messages);
    echo gettext("Status");
    ?>
    PUT MY messages.po and messages.mo to /usr/local/www/language/zh_CN/LC_MESSAGES/, and the mo file has translate the Status to chinse string 状态

    when I open the link http://192.168.1.1/test.php on a client pc with ubuntu 10.4
    it only display Status, not 状态

    could somebody tell me where is wrong and how can I FIX IT!
    THANKS!


  • I done the same in my debian host with lighttpd php5 and the gettext
    the test.php works fine


  • I try again

    putenv('LANG=zh_CN');
    setlocale(LC_ALL, 'zh_CN');
    bindtextdomain(messages, '/usr/local/www/language');
    textdomain(messages);
    echo gettext("Status");
    ?>
    PUT MY messages.po and messages.mo to /usr/local/www/language/zh_CN/LC_MESSAGES/, and the mo file has translate the Status to chinse string "zhuangtai" instead of " 状态"

    the page http://192.168.1.1/test.php displays "zhuangtai" instead of "Status"

    could somebody tell me where is wrong and how can I FIX IT!
    THANKS!