Wednesday, April 20, 2011


At work, we are going to be bringing on a lot of European customers over the next couple of months, so my current project is the Globalization of our web application. Not a small undertaking as any who have done so will already know.

When we originally wrote our web app, we did not take any Globalization into account. Our web app was first written using the .NET beta version and I do not think any support existed for globalization, but now that we are on .NET 2.0, there is quite a bit of support.

One of the first things I discovered was the .NET CultureInfo object in the System.Globalization namespace. Most of our web pages derive from a custom Page object, and in setting the Page.Culture object in the custom page with the user's preferred culture, .NET did most of the work in reformating dates and numbers. I did however have to go through and remove a bit of custom date formatting that was being done throughout the app.

Another tool that was brought to my attention was the jQuery Globalization project, which can be found here. If you are not familiar with jQuery, it is a JavaScript library that really simplifies client-side coding in web pages. I have only recently begun using it, but I am quickly becoming a fan.

I have also discovered the TimeZoneInfo object, although I have not actually started using it yet. This object allows easy time conversion between time zones as well as to/from UTC and local time zones. However, before I can start using this, I need finish converting all of our Database datetime columns to be UTC instead of our local EST.

1 comment:

  1. "Back in the day" we used to refer to it as i18n. Internationalization.

    We recently ran afoul of some globalization/localization used by our portal product wherein a user could change their language locale, and even though we only have one language defined in content management it would still do strange things like not allow the user to update content fields.