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
b. sh configure.sh, and set the new language as default
c. sh secure.sh

----
Gallery URL (optional but very useful): http://61.28.15.43/dreamhouse/gallery/
Gallery version: v1.4.3-pl1
Apache version: Apache/2.0.49
PHP version (don't just say PHP 4, please): PHP/4.3.4
Graphics Toolkit: Netpbm
Operating system: Trustix Secure Linux/Linux 2.4.25-8tr #1 i686
Web browser/version (if applicable): IE 6.0

 
h0bbel
h0bbel's picture

Joined: 2002-07-28
Posts: 13451
Posted: Tue, 2004-05-25 13:50

It seems to work just fine in IE6 from here?

 
nicolas_zheng

Joined: 2004-05-25
Posts: 4
Posted: Tue, 2004-05-25 15:01

Can you see Chinese correctly when changing the language to it from the pull-down menu?

 
h0bbel
h0bbel's picture

Joined: 2002-07-28
Posts: 13451
Posted: Tue, 2004-05-25 17:33

nicolas_zheng, not here at home since I don't have the chinese language pack installed. I can check again at work tomorrow.

 
nicolas_zheng

Joined: 2004-05-25
Posts: 4
Posted: Wed, 2004-05-26 00:38

Thank you in advance

 
h0bbel
h0bbel's picture

Joined: 2002-07-28
Posts: 13451
Posted: Wed, 2004-05-26 10:57

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.

 
nicolas_zheng

Joined: 2004-05-25
Posts: 4
Posted: Wed, 2004-05-26 14:03

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

 
Tim_j
Tim_j's picture

Joined: 2002-08-15
Posts: 6818
Posted: Thu, 2004-06-17 12:24

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