Libglade Reference Manual
<<< Previous Page | Home | Up | Next Page >>>

# Internationalisation with Libglade

Libglade now supports i18n through the gettext system. The `libglade-xgettext` program that is distributed with libglade can be used to extract translatable strings from (multiple) XML interface descriptions. It can output in either the standard PO file format, or output a dummy C file that can be fed to xgettext with the rest of the source of your package. For full details, run "libglade-xgettext --help". Note that this program requires python. If this is too inconvenient to a lot of people, I may consider rewriting it in C (patches welcome :)

While building the interface, libglade will translate the strings it finds, if i18n was not disabled during build. It will default to using the current text domain for the translations. If you want to specify a different domain (this would be useful for libglade dialogs provided by a library), you can use the `glade_xml_new_with_domain` to create the GladeXML object, rather than `glade_xml_new`. This will cause the strings to be translated using a different translation domain.

<<< Previous Page | Home | Up | Next Page >>>
Adding GNOME Support | Extending Libglade