[pygtk] Translating application
Pietro Battiston
toobaz at email.it
Wed Oct 21 04:58:48 WST 2009
Il giorno mar, 20/10/2009 alle 16.08 +0200, Timo List ha scritto:
> Hello all,
>
> my application is being translated to the default language at startup
> with this code:
>
> try:
> locale.setlocale(locale.LC_ALL, '')
> except:
> pass
>
> for module in (gettext, gtk.glade):
> module.bindtextdomain(APP_NAME, LOCALE_PATH)
> module.textdomain(APP_NAME)
>
> There is only 1 computer I found this not working on. So for this
> person and for others who just want a different language, I want to
> add an option to change it.
>
> The problem is that if I want to set the locale during runtime, I get
> the locale exception (locale.Error).
> How can this be done?
The fact that the only app I know allowing to freely choose locale,
gretl, obliges you to restart to see changes suggests me you just can't.
But I may certainly be wrong.
Pietro
More information about the pygtk
mailing list