http://library.gnome.org/devel/gtk/2.11/GtkBuilder.html#GtkBuilder--translation-domain
"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
dgettext()."
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
GtkBuilder.
>>> import gettext
>>> gettext.bindtextdomain("myapp", "/path/to/locale/dir/")
>>> gettext.textdomain("myapp")
Laszlo
2009/3/1 Osmo Salomaa <[email protected]>:
> 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 <[email protected]>
>
> _______________________________________________
> pygtk mailing list [email protected]
> http://www.daa.com.au/mailman/listinfo/pygtk
> Read the PyGTK FAQ: http://faq.pygtk.org/
>
_______________________________________________
pygtk mailing list [email protected]
http://www.daa.com.au/mailman/listinfo/pygtk
Read the PyGTK FAQ: http://faq.pygtk.org/