简体   繁体   中英

Localization of Windows Desktop app

I am starting a small project in C#/WPF writing a Windows desktop application. However, searching for information on how to localize the app seems a lot more challenging. Most of the information I find is very abstract and takes more about planning than actual code and how to do it.

Since I am writing a small application, I just need a very simple explained "how to" translate text, and good practices to consider.

Anyone have any experience that can share some resources or some pointers in the right direction?

I always recommend the WPF Localize extension: http://wpflocalizeextension.codeplex.com/

When using that you can do something like:

<Button Content="{lex:Loc Test}" />

and the Content of the button is pulled from the resources.

Once set up it is very easy to use and a good introduction to it can be found HERE .

Full on localization is so complex that one might argue to have an entirely separate UI by culture. Everything is different, dates, currency, text, layout, and even some colors or images would be a mistake in some cultures.

If it is just a small app and all you want to do is change the text based on culture here is a very simple example:

http://www.codeproject.com/Articles/299436/WPF-Localization-for-Dummies

可以在这里找到另一种简单而优雅的本地化应用程序方法: http : //wpftutorial.net/LocalizeMarkupExtension.html它基于标记扩展。

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM