How to set and change the culture in WPF

后端 未结 7 1640
孤独总比滥情好
孤独总比滥情好 2020-11-30 00:02

I have a .NET 4.0 WPF application where the user can change the language (culture) I simply let the user select a language, create a corresponding CultureInfo and set:

7条回答
  •  再見小時候
    2020-11-30 00:15

    I'm not sure how to get around the "can't call OverrideMetadata multiple times" exception.

    As a workaround, when the user changes UI cultures in your app, you could restart your app with that culture, passing in the new culture as a command line argument. Unless your users will be changing cultures often, this sounds like a reasonable solution.

提交回复
热议问题