Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
how-to for php and gettext
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Off the Wall
View previous topic :: View next topic  
Author Message
goldfish
n00b
n00b


Joined: 02 Jul 2003
Posts: 48
Location: Finland

PostPosted: Thu Jul 06, 2006 12:58 pm    Post subject: how-to for php and gettext Reply with quote

Hi!

Does any one of you know any good large scale php gettext how-to's? I've googled a while but found only short references...

Please!
_________________
one life. countless ways to live it.
Back to top
View user's profile Send private message
aidanjt
Veteran
Veteran


Joined: 20 Feb 2005
Posts: 1102
Location: Rep. of Ireland

PostPosted: Thu Jul 06, 2006 1:26 pm    Post subject: Reply with quote

http://uk.php.net/manual/en/ref.gettext.php

read the user notes at the bottom too, they usually have helpful pointers.
Back to top
View user's profile Send private message
goldfish
n00b
n00b


Joined: 02 Jul 2003
Posts: 48
Location: Finland

PostPosted: Fri Jul 07, 2006 7:46 am    Post subject: Reply with quote

I can't get it to work. I have this simple php test file

Code:

setlocale(LC_MESSAGES, 'en_GB');

bindtextdomain("test", "./locale");
textdomain("test");

        echo _('test string1');
        echo _('test string2');

but it only prints the original strings not the ones that are translated in /locale/en_GB/LC_MESSAGES/test.mo. I made the translation with poEdit.
There is without a doubt something I've made wrong but can't solve it.
_________________
one life. countless ways to live it.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Off the Wall All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum