Tuesday, January 10, 2012

Localization Framework for Silverlight 4 following MVVM model

Introduction:

There has been so many posts about localisation but I couldn't get a post which describes a framework for localisation which works best for MVVM model as I had to do some tasks on Silverlight 4 with MVVM.

Now that I have done most part of the task, I wanted to share the work done.

In this post I will go through the framework and want to have this post as elaborative as possible.

Note: This is my first blog .. hence there will be some issues with the way of presentation.. 


Points to be taken care in case of silverlight 4:
With Silverlight 4 .. following are the points need to be taken care while developing a localized application:

  1. By default, silverlight application is not having localisation support. ie. but just creating a resource file(localized) and building the application, localization will not be applied. For this you need to update the project file (*.csproj) to include extra tags (<SupportedCulture> </SupportedCulture>) and specify upfront what all languages it need to support with comma separated culture codes. At present there seems to be no other alternation than to manually open and edit the csproj file to achieve this.
  2. If you bind the Xaml with data from viewmodel, the culture change will not alter the view model data.

Will be updating the blog sooooon.....

No comments:

Post a Comment