Reputation: 341
When I try to create a CultureInfo
for zh-HK using the Windows Phone 7 RTM SDK, I get a System.ArgumentException
with "Value does not fall within the expected range.".
This is using the ENU variant of the SDK (US / English).
http://msdn.microsoft.com/en-us/library/system.globalization.cultureinfo(v=VS.95).aspx specifically uses the "zh-HK" identifier.
The exact code is:
var culture = new CultureInfo("zh-HK"); // Throws ArgumentException
Upvotes: 2
Views: 371
Reputation: 65586
That MSDN document is specific to Silverlight 4. It doesn't state that all listed cultures are available on the phone. In fact:
During initial availability, Windows Phone 7 will support 5 languages; English, French, Italian, German and Spanish.
I suspect that is why the Chinese (Hong Kong SAR, PRC) culture is not supported. There aren't even any Chinese region format settings on the device.
If you want to do something specific for phones that will be used in Hong Kong, I would recommend using CurrentCulutre
or CurrentUICultre
as appropriate.
Upvotes: 3