문제

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.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top