gettext again

cantabile cantabile.03 at wanadoo.fr
Sun Aug 7 21:33:21 CEST 2005


stasz a écrit :
> On Sun, 07 Aug 2005 11:09:14 +0200, cantabile wrote:
> 
> 
>>Hi,
>>I'm failing to make it work but can't find out what's wrong. Here's what 
>>I do :
> 
> [....]
> 
>>How come ? What's wrong with what I am doing ?
> 
> Start with this little howto about gettext.
> http://childsplay.sourceforge.net/translate-howto.html
> 
> And then do this in your test.py:
> http://www.python.org/doc/2.4.1/lib/node330.html
> 
> You should read the part about gettext in the Python Library Reference
> it's really good :-)
> 
> Good luck,
> Stas Z
> 
> 

Well, I must be dumb, because I did exactly that and it still doesn't 
work...

BTW, I have no pygettext module. I asked here and somebody said it was 
deprecated and now included in xgettext.
And I've read the Python doc about gettext about ten times, but it seems 
quite outdated since it calls pygettext (as staded above)...

I've read the info pages of gettext too (quite a long work).

Here's my test1.py file again :

===========================
import gettext, os, locale

locale.setlocale(locale.LC_ALL)
gettext.install('test1.py', '/usr/share/locale')

msg = _("This is a message without accented characters.")

print msg
===========================

What can I do now ?



More information about the Python-list mailing list