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