Does your web site die when it sees unexpected languages?


Recently I've seen a spate of bugs involving client-server web applications related to the user locale.

Windows Vista has added a ton of locales that weren't there in XP or Server 2003 or Microsoft.Net v2.0.  Additionally users can create and use their own custom locales.  Lastly, they've always been able to edit their language preference(s) in IE.

It seems that when some web sites get a language/region pair that their OS doesn't support in the HTTP_ACCEPT_LANGUAGE headers they crash.  The way to solve this is to make sure that your application has a fallback path for unknown languages (like to en-US or invariant or some other appropriate locale).

To test that your web site can handle unexpected client locales, you can try some of the new languages in Vista, such as Greenlandic (Greenland), or make your own custom locale, like tlh-US or haw-US or fj-FJ.  Even editing IE's language preferences may provide test data to your servers.

Currently users rarely change IE's language preference, but we expect that with Vista and in the future, more users will be choosing locales (cultures) that are more appropriate for them.  So it will only become more likely that your server will encounter language tags it doesn't recognize.

- Shawn

 

Comments (2)

  1. RubenP says:

    Ah, like MSDN recently started crashing for Dutch users (sorry, couldn’t help it; it’s been fixed though).

  2. I found it because I was "playing" with a custom haw-US (Hawaiian, US) annd couldn’t figure out why http://www.msdnwiki.com was dying on my Vista machine but OK on my XP machine 🙂

    Of course http://www.msdnwiki.com is a beta test place, so that isn’t too unexpected.  That doesn’t address Dutch on MSDN itself though.

Skip to main content