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 » Tue Mar 20, 2012 11:55 am

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: 15173
Joined: Fri Apr 21, 2006 8:03 pm
Location: $FCE2

Re: How to change UI language at runtime

Post by doublemax » Tue Mar 20, 2012 12:45 pm

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 » Tue Mar 20, 2012 3:07 pm

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