This is a little code snippet from php manual:
putenv('LC_ALL=zh_CN'); setlocale(LC_ALL, 'zh_CN'); bindtextdomain('domain', './locale'); textdomain('domain'); echo gettext('Hello');
Which will output ?? as defined in
domain.mo file, but the problem is as long as the Apache is running,
gettext() always return the cached result.
If I change the translation of Hello to ?? in
domain.mo, it will still output ??.
However there is a fix for this by changing the
domain argument of
textdomain() to a new name. Like from
"domain2". But this is really painful to edit the php file every time I updated the
Is there a better way for doing this, like remove some folders or calling some php functions to do the job? So that I can write a little script for this purpose.