Question

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.

Was it helpful?

Solution

There's an article on CodeProject that talks about this. ("This article is about how to create a user interface in Windows Presentation Foundation (WPF) which is multilingual and where the language can be changed at runtime.")

https://secure.codeproject.com/KB/WPF/WPF-Mulit-Lingual.aspx

OTHER TIPS

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.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top