My WPF Localization and Language Expectations
WPF Localization and Language switching at run-time is not exactly solved clearly by Microsoft. After my experience (which includes researching for days on separate occasions and changing to localize using Resources.resx when localizing with BAML was not working for everyone involved) I had come to the conclusion that WPF Localization was just going to remain a black mark on WPF until Microsoft provided an easy recommended solution.
Microsoft has a lot of information on localization. They have pages and pages of it and a lot of talks about localization using Resources.resx or using BAML (Binary XAML).
I came to realize that I had the following expectations:
- Development for Localization should be easy.
- Development for Localization should not require “extra” libraries or separate projects.
- Localized strings should come from the same place for XAML as for C# code.
- Language switching should be a run-time option.
- Localization changes should not require a rebuild or recompile.
- Localization method should allow for us of a localization tool (such as Alchemy Catalyst).
- Localization should not require every item has an a unique identifier (as in no x:Uid tags in WPF).
- Missing strings in any language should be easily identified.
- FlowDirection should change with language when appropriate (such as for Hebrew).
Neither the Resources.resx or the XAML solutions seemed to meet my expectations.
Time came to decide on a localization method for WPF again, and I again embarked into similar research as before. I found all the same answers.
However, I am now a WPF Expert. A Senior WPF Developer if you can call anyone such for such a young technology.
I went through all the same pages as before only this time, I pieced together a localization solution that comes the closest to meeting all my expectations.
If you don’t agree with most of my expectations, feel free to use another WPF localization solution. I am not going to argue that mine is the best for everyone, just the best for me and my expectations.
In all my searching I have found no one who is using my solution. Expect my new solution soon and link at the end of this post soon.