Dynamic internationalization with wxPython

What is the wxPython way of dealing with internationalization?

I have an application I want to internationalize *and* want to allow selection
of the natural language **at run-time**.

I am currently using gettext wich allows me to load the language selected by the
LANGUAGE environment variable and the text loaded in various .mo files created
by pygettext.py and msgfmt.py. I can start the application in the language
selected by the LANGUAGE environment variable.

But when I want to change the language, i would have to change the string of
every widget that has a label. Is there a way to ease this under wxPython?

Thanks in advance.

···

--

Pierre Rouleau

Pierre_Rouleau@ImpathNetworks.com wrote:

What is the wxPython way of dealing with internationalization?

I have an application I want to internationalize *and* want to allow selection
of the natural language **at run-time**.

I am currently using gettext wich allows me to load the language selected by the
LANGUAGE environment variable and the text loaded in various .mo files created
by pygettext.py and msgfmt.py. I can start the application in the language
selected by the LANGUAGE environment variable.

But when I want to change the language, i would have to change the string of
every widget that has a label. Is there a way to ease this under wxPython?

No. It works essentially the same way in wxWindows (i.e., gettext catelogs.) You can specify a language during startup, but if you cange it later then you'll still have to change all your controls.

···

--
Robin Dunn
Software Craftsman
http://wxPython.org Java give you jitters? Relax with wxPython!