[I18n-sig] Help with getText lib

Martin v. Löwis martin at v.loewis.de
Thu Dec 11 16:42:19 EST 2003


Michel Martin <michel.martin at usherbrooke.ca> writes:

> I have difficulty using getText. In fact, I'm able to create my .po
> files and my .mo files. But I'm not able to read/retrieve them using
> either "gettext.install(...)" or "gettext.find(...)".

Did you set the LANG= environment variable? If not, you should
explicitly specify the target language, e.g. by defining

def _(msg):
    return gettext.translation('dev',r'c:\foo\bar','en').ugettext(msg)

HTH,
Martin



More information about the I18n-sig mailing list