Joachim Kerschbaumer
Joachim Kerschbaumer

Reputation: 9871

WPF locbaml-ed application and runtime language switch?

i wonder if there is a simple solution to change language of a wpf application during runtime. i used locbaml to globalize all the resources. Setting the Current Thread's UICulture in the App-constructor works fine, but when i try to chang it a little bit later, i doesn't reflect the changes anymore. This was actually quite easy with winforms, but i have no clue how to solve the same problem with wpf. any ideas? regards j.

Upvotes: 2

Views: 2189

Answers (1)

Omer van Kloeten
Omer van Kloeten

Reputation: 11980

No.

Once you load an assembly and it is bound to your application, you can not change classes in mid-work. You could create a bootstrapper assembly that loads the current language and when you change the language you close and re-open your application automatically, but I doubt that's what you want or need.

What I did on one of my projects was create a globalized application framework using converters, etc. You can see some of the problems I ran into here and especially this post which shows how it looked. HTH if you decide to go the same way as I did.

Upvotes: 1

Related Questions