[pygtk] gtk.Builder and translation directory
laszlok2 at gmail.com
Mon Mar 2 12:25:51 WST 2009
"The translation domain used when translating property values that
have been marked as translatable in interface descriptions. If the
translation domain is NULL, GtkBuilder uses gettext(), otherwise
That is, GtkBuilder uses gettext directly, so whatever translations
are loaded for gettext will be available for GtkBuilder.
Here is how to set the translation domain and directory for gettext.
It should then work, although I have not tested it specifically with
>>> import gettext
>>> gettext.bindtextdomain("myapp", "/path/to/locale/dir/")
2009/3/1 Osmo Salomaa <otsaloma at cc.hut.fi>:
> Hello list,
> I'm trying to move from Libglade to GtkBuilder and I have one problem
> remaining. gtk.glade had a bindtextdomain function (much like
> gettext.bindtextdomain) that took the translation directory as an
> argument. gtk.Builder seems to have a set_translation_domain method, but
> it's only for defining the domain. How do I set the directory where to
> search for translations to strings in GtkBuilder XML files?
> Osmo Salomaa <otsaloma at cc.hut.fi>
> pygtk mailing list pygtk at daa.com.au
> Read the PyGTK FAQ: http://faq.pygtk.org/
More information about the pygtk