Hi,

> I have created the po and mo file and put them under
> /var/www/cgi-bin/xxxx/locale/timemanagement/zh_CN/LC_MESSAGES/ . but it didn't
> work at all, I guess there may be something wrong with my code. but no idea.
> can anyone give some advice to the next action ?

You have the doc here:
  https://www.gnu.org/software/gettext/manual/html_node/PHP.html
and a working example here:
  
http://git.savannah.gnu.org/gitweb/?p=gettext.git;a=tree;f=gettext-tools/examples/hello-php

But I can give you an extra advice:
> $language = 'zh_CN';
> putenv("LANG=$language");
> setlocale(LC_ALL, $language);

The value of LANG and LC_ALL must be the name of a locale that exists on the
system. Run "locale -a" to see the names of the installed locales.

Bruno


Reply via email to