开发者

What is the best way of localization LOCBaml or Resx based localization?

开发者 https://www.devze.com 2023-01-14 07:21 出处:网络
I came through this What is the best way to localize a WPF application, sans LocBAML? . But, this didn\'t answer what I\'m looking for.

I came through this What is the best way to localize a WPF application, sans LocBAML? . But, this didn't answer what I'm looking for.

I'm creating a CustomControl in WPF. I would like to provide localization support. The control contains, images, 开发者_运维百科strings etc.,

Any help would be greatly appreciated.

Thanks


I think the document linked in this post contains a lot of information about localization in WPF. In the end, it is up to you to decide which mechanism to use.

Since you are talking about a custom control, I would consider to give it a Culture dependency property which the consumer of your control can use to specify the desired culture. This way, the consumer can use your localized control, relatively independent of the localization strategy he/she chose.


I'd suggest using Resx, try integrating into a WPF application with the TranslationByMarkupExtension example. http://www.wpftutorial.net/LocalizeMarkupExtension.html

LocBaml was a very odd thing for Microsoft to put out there and isn't better, or even complete.

0

精彩评论

暂无评论...
验证码 换一张
取 消