Why doesn gettext work on my libglade UIs with Python <= 2.2?
Note: this has been fixed in Python2.3 by Martin v. Lwis; see the bug report at [sourceforge.net] for details. This was actually a problem with Python. Python2.0 to 2.2 included a pure-python gettext.py module, which provides the same basic gettext API, but has some new features. The problem with a pure python implementation is that it never calls glibc textdomain() and bindtextdomain(). Since libglade is implemented in C, the internationalization happens outside the scope of the python interpreter. Without *textdomain(), libglade never knows that C gettext support is to be activated for the UI you are instantiating. There are a few workarounds: • One is to use Martin’s C gettext module intl.so, which can be downloaded from [www.informatik.hu-berlin.de] If you import intl and call the *textdomain() functions, things should work fine. • You may try upgrading to Python 2.2.2 – its “locale” module now has the required functions.
• 22.4. I’m using libglade, but what do I do with the signals and handlers I set in the glade file? • 22.5. I’m using Gnome and libglade, but some widgets don’t work properly. • 22.6. When I invoke GladeXML() or glade.XML() all the widgets in my gladefile are displayed! • 22.7. How do I create and use a custom Glade widget? • 22.8. How do I retrieve the ID of a signal connection made by signal_autoconnect? • 22.9. My libglade files have widgets that don’t show up in the GladeXML tree! • 22.10. When I load a glade file in GladeXML I get evil warnings about GnomeApp and a crash! • 22.11. How do I produce or reuse a [portion of a] widget tree in glade? • 22.12. How can I get a new instance of a widget defined in a glade file? • 22.13. Tabs in Notebook don’t show up!