Silverlight 3; switching to zh-Hans culture excludes exception
I am trying to localize a Silverlight 3.0 application in Simplified Chinese.
However, when I try to navigate to this culture (zh-Hans, according to http://msdn.microsoft.com/en-us/library/system.globalization.cultureinfo%28VS.95%29.aspx ) with this code:
var currentCulture = new CultureInfo("zh-Hans");
Thread.CurrentThread.CurrentCulture = currentCulture;
Thread.CurrentThread.CurrentUICulture = currentCulture;
I am getting the following exception:
Culture name 'zh-Hans' is not supported.
I am using Windows XP SP3 on an en-GB machine.
Is this a Silverlight 3 issue? Or do I need to install some additional Windows XP language packs?
thank
source to share
The problem turned out to be that my Windows XP installation (default en-GB) had no files for East Asian languages installed by default.
Enabling them was pretty easy - see http://newton.uor.edu/Departments&Programs/AsianStudiesDept/Language/asianlanguageinstallation_XP.html for instructions.
After doing this, I was able to change Silverlight 3.0 to zn-Hans and zn-SG
var currentCulture = new CultureInfo("zh-Hans");
or
var currentCulture = new CultureInfo("zh-SG");
and etc.
source to share