Friday 27 April 2007

Localisation in .Net

I'm all fired up at the moment about integrating localisation for a major on-line retailer in the UK. Implementation seems to be another religious debate among those who have an opinion but the business constraints of our clients can sometimes simplify our options.

My choices were to use the built-in functionality in framework 2.0 or go find another job. So now, I'm working hard on moving the resource repository into SQL server and rolling a custom ResourceProviderFactory that uses the database (instead of resx files) to store my localised strings.

The first bit was pretty straight-forward. Google is my friend and I found some great resources and examples on the web.

You would think that the technology is old enough now that it would be simple to roll a robust solution but I can't seem to find any examples that implement IDesignTimeResourceWriter and DesignTimeResourceProviderFactory. My research leads me to believe that these classes are the key to making Visual Studio's "Generate Local Resource" tool work it's magic on my string repository instead of its native resx repository. So I'm rolling my own. It's a work in progress and I don't have any reason to believe it works but the code is here.

No comments: