* CultureInfo.cs : it seems that zh-Hant and zh-Hans are introduced
as almost alias of zh-CHS/zh-CHT in vista and some new windows.
Add hacky support for them.
* CultureInfoTest.cs : test zh-Hant.
svn path=/trunk/mcs/; revision=134499
+2009-05-21 Atsushi Enomoto <atsushi@ximian.com>
+
+ * CultureInfo.cs : it seems that zh-Hant and zh-Hans are introduced
+ as almost alias of zh-CHS/zh-CHT in vista and some new windows.
+ Add hacky support for them.
+
2009-01-07 Atsushi Enomoto <atsushi@ximian.com>
* CompareInfo.cs : Fixed bug #462957. With empty target string it
2009-01-07 Atsushi Enomoto <atsushi@ximian.com>
* CompareInfo.cs : Fixed bug #462957. With empty target string it
bool ConstructInternalLocaleFromName (string locale)
{
bool ConstructInternalLocaleFromName (string locale)
{
+ // It is sort of hack to get those new pseudo-alias
+ // culture names that are not supported in good old
+ // Windows.
+ switch (locale) {
+ case "zh-hans":
+ locale = "zh-chs";
+ break;
+ case "zh-hant":
+ locale = "zh-cht";
+ break;
+ }
+
if (!construct_internal_locale_from_name (locale))
return false;
return true;
if (!construct_internal_locale_from_name (locale))
return false;
return true;
+2009-05-21 Atsushi Enomoto <atsushi@ximian.com>
+
+ * CultureInfoTest.cs : test zh-Hant.
+
2009-01-07 Atsushi Enomoto <atsushi@ximian.com>
* CompareInfoTest.cs : added test for #462957.
2009-01-07 Atsushi Enomoto <atsushi@ximian.com>
* CompareInfoTest.cs : added test for #462957.
ms.Seek (0, SeekOrigin.Begin);
var deserializedCulture = (CultureInfo) formatter.Deserialize (ms);
}
ms.Seek (0, SeekOrigin.Begin);
var deserializedCulture = (CultureInfo) formatter.Deserialize (ms);
}
+
+ [Test]
+ public void ZhHant ()
+ {
+ Assert.AreEqual (31748, new CultureInfo ("zh-Hant").LCID);
+ Assert.AreEqual (31748, CultureInfo.GetCultureInfo ("zh-Hant").LCID);
+ }