Prism Application Localization Strategies

Jan 7, 2009 at 7:41 PM
I am learning to use the Prism framework and plan on developing an application that will potentially load 3rd party modules, as well as those I write myself.

One of the requirements for this application is that it support multiple languages and that the UI instantly reflect changes to the current language setting.  Aside from the fact that WPF doesn't provide a strong OOTB localization solution, has anyone found a good strategy for handling localization in a Prism application?  It seems that each module must have its own set of resource assemblies tied to the current thread's locale setting.  The real trick is getting the UI to respond immediately to settings changes.  It'd be nice if there was an elegant solution for this available.

Jan 7, 2009 at 10:03 PM
We discovered getting the app to change languages on the fly was waay too much work for the reward. Most people (except language testers) don't need to flip the language of an app while it is running.

Tamir Khason has a nice library that manages localization for any dependency property you can bind a static Resource to. Colors, fonts sizes, RTL settings... you name it.

One cool thing a teammate of mine did was take the ".NET Internationalization" book, used the example for querying a Web translation source and wrote a little app that will automatically take our English resx files and make N-language versions of it. You can even do psuedo-translations to see where your UI will break down before translators get a hold of it.

MS does need something better than "Add UID's to everything and run LOCBAML"

Jan 11, 2009 at 10:59 AM
I'm using the classes shown in by Jecho Jekov, they work very well.

Be care that the resource file used by all the modules is the Shell resource file.

Jan 11, 2009 at 7:16 PM
How can 3rd party modules use the Shell resource file from our app? 

This is the entire difficulty with localizing Composite WPF.  It seems that each module must have its own set of resources.  So how do you get immediate run-time UI response to locale changes from all modules?
Jan 22, 2009 at 6:55 AM
Edited Jan 22, 2009 at 6:58 AM
I'm posting here to bring this thread back up to get some attention. For me this is a very important question "What is the recommended or best approach for localization in Composite WPF?"

There seem to be quite a lot of approaches available and even after some time investigating and comparing these approaches I find it quite hard to judge them and decide which is best. Any suggestions here.
Maybe a combination between link for "global" localization and the best practice approache (link) from Microsoft for module wide localization. So you would have system-wide XML localization dictionarys plus satellite DLLs for Module specific localization.