views:

52

answers:

2

I came through this http://stackoverflow.com/questions/87184/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

+1  A: 

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.

gehho
+1 Thanks, but decision is what confusing. I've planed to go with ResX based.
Avatar
It's true that the topic is confusing. I do not know why Microsoft introduced this LocBaml approach which is not even nearly complete. The impression you get is: "if I use WPF, I have to use LocBaml for localization" - but that is definitely wrong. I think using resx files is still a lot more powerful and better maintainable. All this is also in the document from the link above.
gehho
+1  A: 

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.

slomojo
Yeah. I finally end up with resx based localization. It rocks.
Avatar