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

后端 未结 5 1158
既然无缘
既然无缘 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:47

    I made a complete localisation solution (incl. translation editor) that also supports XAML translation through a number of MarkupExtensions. It uses a dictionary with all the translated texts (including singular/plural forms) that can be accessed through MarkupExtensions from XAML or regular methods from other code. The MarkupExtensions also support changing the language at runtime and even update when the underlying dictionary file is modified.

    Other features are localised date/time and number formatting and typographic helpers.

    I'm using this library successfully in a few applications and plan to employ it in more apps in the future.

    http://dev.unclassified.de/source/txlib

提交回复
热议问题