Tuesday, October 5, 2010

WP7 Multi-language v2

 While working on my WP7 app I had to improve the multi-language library I've posted earlier on my blog http://sviluppomobile.blogspot.com/2010/06/wp7-multilanguage-app-proof-of-concept.html.

What's new in v2:

  1. The LanguageSingleton class has now resources that can be accessed using an indexed property. In the published sample the Save messagebox uses the indexed property lang["MainPage.Messages.saved"] ) 
  2. The LanguageSingleton class implements LanguageChanged property so that every window could set the localized resources when the language changes (in this case is the ItemSource for the PickerBoxDialog developed by Alex Yakhnin)
  3. Implemented multi-language support for ApplicationBarIconButton (the same mechanism using button index as the one used for ApplicationBarMenuItem

I am still not sure if this is the easiest way to implement multi-language support (if someone has a better way to do it please send me a message and I will post it). There is also the M.V.V.M. way, but I think it would be more code to write to obtain the same result.


1 comment:

  1. Hi,

    I recently downloaded your solution and it seems to be a good one. I have started implementing it for some apps I am working on and I will let you know if I can refactor it or find another way in offering language selection in applications.