Silverlight's System.Globalization Namespace

One of the ever-present questions in the Silverlight world is "what's missing ?". In other words what does the .NET Framework or WPF have that Silverlight doesn't ? In terms of globalization the obvious place to start is the System.Globalization namespace and to this end I have written a simple Silverlight Globalization Class Comparison document that lists all of the classes, methods and properties in the .NET Framework's System.Globalization namespace and indicated whether the same feature exists in Silverlight's System.Globalization namespace.

For me it is one thing to know that Silverlight doesn't support a particular feature but it is another to know exactly why it doesn't and whether it will be coming in a future release of Silverlight. Of course, this is often speculation but in this post I give my opinion on why specific features aren't there and if they are coming (there are no official secrets being revealed here ? this is purely speculation based on reasonable deduction).

Let's start with the missing lunisolar calendars (ChineseLunisolarCalendar et al). There is no technical reason why these calendars couldn't be in Silverlight so I suspect that these have been excluded in the name of keeping the download size down.

Also missing is the PersianCalendar together with TextInfo.IsRightToLeft and FrameworkElement.FlowDirection support for right to left languages. Silverlight 2 (and at the current time Silverlight 3) has no support for right to left languages and it is likely that we will need to wait for Silverlight 4 before this appears (Microsoft are well aware that this is an important feature).

The CultureAndRegionInfoBuilder for building custom cultures is absent and is very unlikely to ever turn up in Silverlight. Apart from the inherent differences between the platforms on which Silverlight runs a fairly substantial block to incorporating CultureAndRegionInfoBuilder is that it requires administrator rights to create a custom culture. That is not to say that a Silverlight application cannot use custom cultures (it can) just that the Silverlight application has no way to create the custom cultures that it needs.

All method overloads and properties that have anything to do with locale IDs (LCIDs) are also missing and are unlikely to ever put in an appearance. Apart from the fact that this is a Windows concept and not cross-platform there is the more important point that culture names are the preferred way to identify cultures in the .NET Framework. Culture names always uniquely identify a culture whereas locale IDs are ambiguous (for custom cultures) and are therefore not reliable. Other Windows-specific features such as CultureInfo.ThreeLetterWindowsLanguageName go the same way for the same reason. I suspect that the very useful RegionInfo.GeoId falls into this category.

Others like TextInfo.ToTitleCase do not appear to have any technical reason why they are not included in Silverlight and I can only speculate here that this is another victim of keeping the download side down again.

The TextInfo properties for use with code pages (ANSICodePage, OEMCodePage etc.) are all missing and again I speculate that these are missing because there is no desire to bloat Silverlight with support for legacy systems when Silverlight itself fully supports Unicode.

As new Silverlight releases come out I will update the document and no doubt the list will both shrink (as Silverlight adds features like right to left support) and grow (as the .NET Framework adds more to the System.Globalization namespace).

Be the first to rate this post

  • Currently 0/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5

Posted by: guysmithferrier
Posted on: Tuesday, March 31, 2009 at 10:22 PM
Tags:
Actions: E-mail | Kick it! | DZone it! | del.icio.us
Post Information: Permalink | Comments (2) | Post RSSRSS comment feed

DevWeek 2009 Slides And Source Code

You can find the slides and source code for my DevWeek 2009 presentations this week here:-

Currently rated 5.0 by 1 people

  • Currently 5/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5

Posted by: guysmithferrier
Posted on: Monday, March 23, 2009 at 12:32 PM
Tags:
Categories: Silverlight | Internationalization | Events | Miscellaneous - Technical | Visual Studio
Actions: E-mail | Kick it! | DZone it! | del.icio.us
Post Information: Permalink | Comments (0) | Post RSSRSS comment feed

DDD Scotland Registration Is Open!

'Tis the free conference season and DDD Scotland has opened its registration so if you live anywhere near Scotland (or you don't mind travelling for a free event) get over to http://www.developerdayscotland.com and get registering. DDD Scotland is being held on Saturday 2nd May 2009 and I will be presenting:-

  • What's New In C# 4 ?
    At PDC 2008 Microsoft unveiled C# 4 and all of the new features within. So now we start the roller-coaster of catch up all over again as we desperately struggle to keep up with what?s new and why we should be interested in the latest flashy feature. In this session we will look at dynamically typed objects, optional and named parameters, type embedding, type equivalence, loose type coupling and more. In addition if we have time we will look at the "compiler as a service" feature to be released after C# 4.

Currently rated 5.0 by 1 people

  • Currently 5/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5

Posted by: guysmithferrier
Posted on: Thursday, March 05, 2009 at 3:38 PM
Tags:
Categories: DDD | Events
Actions: E-mail | Kick it! | DZone it! | del.icio.us
Post Information: Permalink | Comments (0) | Post RSSRSS comment feed

DDD South West Registration Is Open!

Go! Quickly! Stop reading this and register now! Registration for DDD South West is now open. Be able to tell your grandchildren that you were there at the very beginning. Remember, there can be only one first time.

DDD South West is a free one day technical event on Saturday 23rd May 2009 at Queens College, Taunton with 13 of the countries' best speakers providing 19 technical presentations.

Be the first to rate this post

  • Currently 0/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5

Posted by: guysmithferrier
Posted on: Tuesday, March 03, 2009 at 10:59 AM
Tags:
Categories: DDD | Events
Actions: E-mail | Kick it! | DZone it! | del.icio.us
Post Information: Permalink | Comments (1) | Post RSSRSS comment feed

DDD South West Registration Opens Tomorrow

Registration for DDD South West opens tomorrow (Tuesday 3rd March 2009) at 10:00am. To register for the event you must first register on the site and if you want to save time tomorrow you can do that part right now.

DDD South West will be held on Saturday 23rd May 2009 at Queens College, Taunton.

Be the first to rate this post

  • Currently 0/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5

Posted by: guysmithferrier
Posted on: Monday, March 02, 2009 at 3:21 PM
Tags:
Categories: Events | DDD
Actions: E-mail | Kick it! | DZone it! | del.icio.us
Post Information: Permalink | Comments (1) | Post RSSRSS comment feed