[pygtk] pygtk libglade and gettext troubles

stas zytkiewicz stas.zytkiewicz at gmail.com
Thu Mar 2 03:46:25 WST 2006


Hello,

Why doesn't this work?

I have this inside my (simple) module:

import locale
import gettext
APP = 'gvr_gtk'
DIR = '/usr/local/share/locale'
locale.setlocale(locale.LC_ALL, '')
gettext.bindtextdomain(APP, DIR)
gettext.textdomain(APP)
gettext.install(APP, DIR, unicode=1)
gtk.glade.bindtextdomain (APP, DIR)
gtk.glade.textdomain (APP)

And I call libglade like this:
  self.glade = gtk.glade.XML(self.glade_path, main_widget_name, domain=APP)

I have a Dutch translated gvr_gtk.mo inside /usr/local/share/locale/nl/....

But when I start my app like this, it stays in English :-(
LANG=nl_NL at euro python myapp.py

I have checked the po and mo file that they correspond with the actual
strings inside
the app. I also tried the approach descriped in the pygtk FAQ but that
doesn't work
either. I'm using Python 2.4 and gtk 2.8.1
Any help would be a appreciated.

Thanks,
Stas


More information about the pygtk mailing list