Gettext configuration.

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
barnbuster
Forum Newbie
Posts: 7
Joined: Fri May 02, 2003 10:19 am

Gettext configuration.

Post 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
User avatar
Weirdan
Moderator
Posts: 5978
Joined: Mon Nov 03, 2003 6:13 pm
Location: Odessa, Ukraine

Post 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.
barnbuster
Forum Newbie
Posts: 7
Joined: Fri May 02, 2003 10:19 am

Post 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.
User avatar
feyd
Neighborhood Spidermoddy
Posts: 31559
Joined: Mon Mar 29, 2004 3:24 pm
Location: Bothell, Washington, USA

Post by feyd »

Post Reply