internationalisation, gettext and dynamic language change

Hello,

The wxWindows samples contain a nice example about internationalisation and the use of xgettext to extract the text strings fromt he source. Assuming that xgettext work in a similar way on python sources (I did not test that yet), I could generate .po files for my python application. But how would I tell my application about the existence of some additional directories containing each a dictinary?
Assuming I can solve the first problem, what is a "good" implementation for changing the language when the application is running? How can I force all objects to get the new text once a user selectes for example Options->Languages->German ?

peter

Peter Wurmsdobler wrote:

Hello,

The wxWindows samples contain a nice example about internationalisation and the use of xgettext to extract the text strings fromt he source. Assuming that xgettext work in a similar way on python sources (I did not test that yet), I could generate .po files for my python application. But how would I tell my application about the existence of
some additional directories containing each a dictinary?

wxLocale_AddCatalogLookupCatalogPathPrefix

Assuming I can solve the first problem, what is a "good" implementation for changing the language when the application is running?

There isn't one. Gettext isn't designed to work that way.

How can I force all objects to get the new text once a user selectes for example Options->Languages->German ?

You either have to call the appropriate Set* method of every widget in your app, or recreate every widget (perhaps just by shutting down and restarting the app.)

ยทยทยท

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