WPF Localization in XAML, what is the simple, easy and elegant way of doing it?

后端 未结 5 1165
既然无缘
既然无缘 2021-02-07 10:14

I have a very common question. What is the best way to do localization in a WPF app. Well, I searched in SO and Binged a lot too. But I could not find any pointers which is real

5条回答
  •  再見小時候
    2021-02-07 10:45

    I Bind all the labels, etc. in my application to an object that I use for displaying the different languages. I store all the strings in a database and just retrieve the proper strings based on the language the user has selected. This has the advantage of instantly updating during run-time. This way the user does not need to restart the application like you would if you chose to make the windows 'Localizable'.

提交回复
热议问题