Partager via


Silverlight V2 Beta2 Globalization readme

CurrentCulture and CurrentUICulture values are not isolated when hosting multiple Silverlight controls on the same page
If you host multiple Silverlight controls on the same web page, setting the CurrentCulture and/or CurrentUICulture values in one control will affect the values in all other controls on the page.

The CurrentCulture and CurrentUICultures can be initialized via the <object> tag’s param tags:
<param name="culture" value="fr-FR" />
<param name="uiculture" value="fr-FR" />

Or programmatically:
Thread.CurrentThread.CurrentCulture = new CultureInfo("fr-FR");
Thread.CurrentThread.CurrentUICulture = new CultureInfo("fr-FR");

Setting the values on the param tags will initialize the UI thread’s CurrentCulture and CurrentUICulture values and setting the values programmatically will initialize the current thread’s CurrentCulture and CurrentUICulture values (if called from the UI thread, it will set the values of the UI thread). If these values are not explicitly set, Silverlight will initialize the values with current user’s OS culture settings.

If you do need to host multiple Silverlight controls on the same page with Silverlight 2 Beta 2, either choose not to explicitly set the CurrentCulture/CurrentUICulture values (Silverlight will use the user’s OS culture settings) or use the same values for all controls.

System.Globalization.CultureInfo.CurrentCulture.DateFormat.Calendar under zh-TW does not pick up Control panel settings for non-Gregorian calendarThis means that formatting dates for this culture on Windows will be incorrect since it does not pick up the non-Gregorian calendar from the control panel's culture settings.

Some CultureInfo data, such as date and number formats, are not available on certain operating systems, so the data from the Invariant Culture is used instead.
System.Globalization.CultureInfo uses culture data provided by the underlying operating systems. Some operating systems do not provide access to certain properties, so data from the Invariant culture is used instead. For example, Windows does not provide data for the MonthDay pattern, so the pattern of the Invariant culture is used instead.

DateString function defaults to MM-dd-yyyy on East Asian systems
The VisualBasic DateString returns dates in MM-dd-yyyy format whereas earlier VB implementations formatted to yyyy-MM-dd on systems with an East Asian language selected as the Language for non-Unicode programs.  

 

more info on Silverlight V2 Beta2-https://www.microsoft.com/silverlight/resources/readme.aspx?v=2.0&sdk=true

Comments