How to change UI language at runtime Topic is solved

If you are using the main C++ distribution of wxWidgets, Feel free to ask any question related to wxWidgets development here. This means questions regarding to C++ and wxWidgets, not compile problems.
Post Reply
denarced
Knows some wx things
Knows some wx things
Posts: 47
Joined: Sun Dec 04, 2011 7:25 am

How to change UI language at runtime

Post by denarced »

Hello,

what is the way to switch between UI languages at runtime by e.g. selecting a menu item? Apparently you can set the locale only once .. Currently I'm setting the localization when the app starts.
User avatar
doublemax
Moderator
Moderator
Posts: 19115
Joined: Fri Apr 21, 2006 8:03 pm
Location: $FCE2

Re: How to change UI language at runtime

Post by doublemax »

There is no automatic or even semi-automatic way to do this in wxWidgets.

If you really, really wanted to do this, you'd have to re-set the label of all controls/texts etc after changing the locale.

I personally don't think it's that important to be able to switch the language at runtime, because a user normally does it only once. So i just ask the user to restart after he changed the language.
Use the source, Luke!
denarced
Knows some wx things
Knows some wx things
Posts: 47
Joined: Sun Dec 04, 2011 7:25 am

Re: How to change UI language at runtime

Post by denarced »

doublemax wrote:I personally don't think it's that important to be able to switch the language at runtime, because a user normally does it only once. So i just ask the user to restart after he changed the language.
Seems like the way to go. Thanks!
Post Reply