bug-gettext
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [bug-gettext] something confuse about gettext in php


From: Bruno Haible
Subject: Re: [bug-gettext] something confuse about gettext in php
Date: Wed, 05 Jul 2017 21:31:54 +0200
User-agent: KMail/5.1.3 (Linux/4.4.0-81-generic; KDE/5.18.0; x86_64; ; )

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

[Prev in Thread] Current Thread [Next in Thread]