How to use the language feature.
girishn
Joined: 2003-06-16
Posts: 6 |
![]() |
Hello everybody, First of all thanks to Bharat for inviting me to talk in this forum! No the question: e.g. putting up some flags representing the languages supported and when the user clicks on it , the document switches to the choosed language. Thanks in advance, |
|
girishn
Joined: 2003-06-16
Posts: 6 |
![]() |
Hi, Is it the right place where I am asking the question? BTW, I found that the language settings are indeed applied based on the users settings. But despite that the text is not translated. Does any one know how to correct this? Thanks! |
|
beckett
![]()
Joined: 2002-08-16
Posts: 3474 |
![]() |
Hi there. Gallery 2's translation requires your webserver to have two things: 1) GNU gettext, which is a set of small programs and library functions that facilitate translations. 2) Your webserver's PHP module must be compiled with gettext support (add --with-gettext to the configuration options, after having installed gettext, of course). If you have more questions, just ask. -Beckett ( beck@beckettmw.com) |
|
girishn
Joined: 2003-06-16
Posts: 6 |
![]() |
hi beckett, Thanks for the reply! I have GNUmake as well as gettext support in the PHP. I created a sample text file in the core directory to test it but no translation??? Can any one test it out and tell me what wrong I am doing? // Set the language as full locale 'de_DE' $language = 'de_DE'; echo "\n"; echo bindtextdomain($domain, "./locale"); //putenv("LANGUAGE=$language"); echo gettext("Hello world!"); Thanks, |
|
beckett
![]()
Joined: 2002-08-16
Posts: 3474 |
![]() |
Right, but those messages aren't in the .mo file, right? Is the G2 translation still not working? If not, then make sure that PHP was compiled pointing to the correct install dir of gettext. It defaults to /usr/local. If it's something else, you need to specify that in the PHP configuration command before compiling. |
|
girishn
Joined: 2003-06-16
Posts: 6 |
![]() |
Hi, Yes there was no "Hello World!" in it, I put instead the "Action" which i see in the de_DE.po but still it don't translate. I checked the above script seperately with a locale/de_DE/LC_MESSAGES/greetings.mo from the examples on www.php.net and the translation works fine on the same server. (just needs an httpd restart) But no translation in Gallery2. I wonder, is this the language feature really working in Gallery2? Please can anybody test the above script in a gallery2 installation. and change the messages in the gettext("") , to something like Action,Active etc. thanks, |
|
bharat
![]()
Joined: 2002-05-21
Posts: 7994 |
![]() |
Girish -- I haven't had a chance to run the test you outline above, but the translation code in G2 does work and has been functioning properly since February or so. Can somebody here publish the link to a demo server where it's functioning so that Girish can see it in operation? |
|
girishn
Joined: 2003-06-16
Posts: 6 |
![]() |
Ok, It seems there is some problem with out local test server. Thanks a lot! |
|
bharat
![]()
Joined: 2002-05-21
Posts: 7994 |
![]() |
By the way, I've had issues on servers which did not have the proper locales installed. On most unix boxes there's an easy way to install the locales that you're going to use. To see wht you have available, try looking in /usr/share/locale |
|