internationalisation/gettext - any sample (.MO) data available ?
Richard Shea
richardshea at fastmail.fm
Thu Feb 5 05:31:02 EST 2004
> Here is the smallest example I can think of (actually, the smallest one
> using Tk - one with pure text output could be smaller):
>
Hi Martin - Thanks very much for your very comprehensive reply, I
appreciate it.
(Thanks also to Jeff/Pádraig for your suggestions)
[lots of very useful stuff snipped]
I've followed the instructions, I think, and everything appears to
gone as it should except that at the moment I am still gettting the
English interface. I'm going to have another go at this tomorrow but I
just wanted to thank you for your kind word on my behalf.
I also wanted to double-check a couple of things. I've got my a.py in
one directory and the python installation in another (that's just the
way I do stuff on this machine) when you said ...
> Save the resulting messages.mo as
>
> ./de/LC_MESSAGES/demoapp.mo
>
... I presumed that was relative to a.py not the python interpreter ?
Is that correct ? That is if I have C:\richardspythonsrc\a.py I should
have C:\richardspythonsrc\de\LC_MESSAGES\demoapp.mo ?
Also I'm working on a WIN32 machine so to achieve ...
> Set the LANG environment variable to de_DE.ISO-8859-1, and
> invoke
... I put ...
import locale
locale.setlocale(locale.LC_ALL, 'german')
... up at the top of a.py - is that what you would advise ?
Thanks once again for your help.
regards
richard.
More information about the Python-list
mailing list