Netgate Discussion Forum
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Search
    • Register
    • Login

    About multilanguage in pfsense2.0

    Scheduled Pinned Locked Moved 2.0-RC Snapshot Feedback and Problems - RETIRED
    3 Posts 1 Posters 3.0k Views
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • G
      gfengyoung
      last edited by

      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!

      1 Reply Last reply Reply Quote 0
      • G
        gfengyoung
        last edited by

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

        1 Reply Last reply Reply Quote 0
        • G
          gfengyoung
          last edited by

          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!

          1 Reply Last reply Reply Quote 0
          • First post
            Last post
          Copyright 2025 Rubicon Communications LLC (Netgate). All rights reserved.