Why the new installed language pack takes no effects?
|
nicolas_zheng
Joined: 2004-05-25
Posts: 4 |
Posted: Tue, 2004-05-25 12:56
|
|
The new installed Gallery runs smoothly except that the locale takes no effects. Anybody can tell me the reason? I followed the steps below, no errors occur. but after that, the Gallery still remain English interface. a. untar the language pack to the path of locale ---- |
|

Posts: 13451
It seems to work just fine in IE6 from here?
Posts: 4
Can you see Chinese correctly when changing the language to it from the pull-down menu?
Posts: 13451
nicolas_zheng, not here at home since I don't have the chinese language pack installed. I can check again at work tomorrow.
Posts: 4
Thank you in advance
Posts: 13451
nicolas_zheng, your site displays chinese correctly. The reason for there still being some English text there, is that noone has completed the translation 100%.
http://www.jems.de/gallery-1.4.3/tools/g1-report.php for details on how much is translated.
Posts: 4
Dear h0bbel,
Thanks for your help.
But one thing more, I used poEdit to view the .po file and found the the 'login' was translated, so I wrote a test.php like the following to test:
<?php
$language = 'zh_CN';
echo putenv("LANG=$language");
echo "<br>";
echo setlocale(LC_ALL, $language);
echo "<br>";
echo bindtextdomain("zh_CN-gallery_core","./locale");
echo "<br>";
echo textdomain('zh_CN-gallery_core');
echo "<br>";
echo gettext("login");
echo "<br>";
echo _("login");
?>
I put the test.php in gallery/ and open my browser to check the echo which was shown like these:
1
/home/httpd/html/dreamhouse/gallery/locale
zh_CN-gallery_core
login
login
It seems that the gettext() dosn't work, am I right?
how can I solve it?
Regards,
Nicolas Zheng
Posts: 6818
Hello ;)
No you are not. Your code is wrong.
Change
echo putenv("LANG=$language"); echo "<br>"; echo setlocale(LC_ALL, $language); echo "<br>"; echo bindtextdomain("zh_CN-gallery_core","./locale"); echo "<br>"; echo textdomain('zh_CN-gallery_core');to
putenv("LANG=$language"); setlocale(LC_ALL, $language); bindtextdomain("zh_CN-gallery_core","./locale"); textdomain('zh_CN-gallery_core');because you want to DO setlocale etc. not print the result ;)
Jens