[pygtk] Problem with Glade and Translations

Zach Tibbitts zach at collegegeek.org
Tue Mar 6 08:46:10 WST 2007

This problem seems to crop up a lot, but even looking back at other reports
of the same issue, I can't get this to work.

my program is translated using gettext, and here's the relevant snippet of
code where the translation is started:

import gettext, locale

class DelugeGTK:
    def __init__(self):
        APP =3D 'deluge'
        DIR =3D os.path.join(dcommon.INSTALL_PREFIX, 'share', 'locale')
        gtk.glade.bindtextdomain(APP, DIR)
        locale.bindtextdomain(APP, DIR)
        gettext.bindtextdomain(APP, DIR)
        gettext.install(APP, DIR)

the problem is that Strings within my Python code are translated fine, but
Strings in the gladefile are not translated at all.
The rest of the code is viewable at http://deluge-torrent.org/browser/trunk,
this snippet came from src/delugegtk.py
-- =

Zach Tibbitts - zach at collegegeek.org
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.daa.com.au/pipermail/pygtk/attachments/20070305/03208dda/at=

More information about the pygtk mailing list