Page 1 of 1

Gettext configuration.

Posted: Thu Feb 09, 2006 9:35 am
by barnbuster
I have reconfigured my php.ini to enable gettext(); and have used GNU GetText to create my .po and .mo files.

I have all the message.po and .mo files appropriately structured and set my paths and lang variables to test gettext();, however without success.

I think that i have a php configuring problem.

What I want to know is:

Does PHP provide the translating functionality independantly by calling the translation from the .mo files? or does PHP have to be configured to use GNU GetText functions directly to call the translation from the .mo. I read that the former was possible.

Thanks

Posted: Thu Feb 09, 2006 1:13 pm
by Weirdan
there is pure php port (it means it's written entirely in PHP) of gettext, but the "official way" (documented in php manual etc.) is to use gettext extension. Gettext extension is a wrapper around GNU Gettext library, thus the gettext library is required to use it.

Posted: Fri Feb 10, 2006 3:32 am
by barnbuster
Weirdan

Thanks, for your help.

So how do you configure PHP to use the GetText library other than uncommenting the extension in php.ini?

There must be a directory that I place the GetText library into, or can I configure the file Path to my GetText library within PHP?

The PHP and GNU documentation on this is vague to say the least.

Posted: Fri Feb 10, 2006 8:16 am
by feyd