[Mono-dev] set culture uses serialization?
Steve Bjorg
steveb at mindtouch.com
Sat Jan 5 10:15:24 EST 2008
Korean culture cannot be instantiated as
new CultureInfo("ko-kr")
throws an exception stating it's not implemented.
There is work item filed to be update the locale builder:
https://bugzilla.novell.com/show_bug.cgi?id=324483
There are other cultures missing as well. The following code
instantiates all 134 cultures lists in the attached file.
using System;
using System.Globalization;
namespace CultureCheck {
class Program {
static void Main(string[] args) {
if(System.IO.File.Exists("cultures.txt")) {
string[] cultures = System.IO.File.ReadAllLines
("cultures.txt");
int failed = 0;
int succeeded = 0;
foreach(string culture in cultures) {
try {
CultureInfo info = new CultureInfo
(culture.Trim());
string now = DateTime.UtcNow.ToString
(info.DateTimeFormat);
++succeeded;
} catch {
++failed;
Console.WriteLine(culture);
}
}
Console.WriteLine("Tested {0} cultures: {1}
succeeded, {2} failed", succeeded + failed, succeeded, failed);
} else {
Console.Error.WriteLine("MISSING FILE: cultures.txt");
}
}
}
}
Only 26 out of 134 cultures fail on mono 1.2.6:
az-cyrl-az
az-latn-az
dv-mv
en-bz
en-029
en-jm
en-tt
fr-mc
ka-ge
de-li
kk-kz
kok-in
ko-kr
ky-kg
ms-bn
ms-my
mn-mn
pa-in
sa-in
sr-cyrl-cs
sr-latn-cs
syr-sy
tt-ru
ur-pk
uz-cyrl-uz
uz-latn-uz
List of missing cultures is also available here (highlighted in
yellow): http://wiki.opengarden.org/Deki_Wiki/Languages
Some of these should be trivial as they are identical to existing ones:
* English (Belize)
* English (Caribbean)
* English (Jamaica)
* English (Trinidad and Tobago)
* French (Monaco)
* German (Liechtenstein)
Others are likely more complicated. Of those, a high-priority
culture is Korean.
- Steve
--------------
Steve G. Bjorg
http://wiki.mindtouch.com
http://wiki.opengarden.org
On Jan 4, 2008, at 10:47 PM, Miguel de Icaza wrote:
>
>> This issue and the fact that Korean isn't supported for CultureInfo
>> are blockers for a large customer deployment of ours. Is there any
>> way these issues can be addressed? Who is working on CultureInfo?
>
> What seems to be the problem with Korean?
>
> Please provide a stack trace, a bug report, or a sample program that
> fails with Korean.
>
> Miguel.
>
>
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: cultures.txt
Url: http://lists.ximian.com/pipermail/mono-devel-list/attachments/20080105/76d907b9/attachment.txt
More information about the Mono-devel-list
mailing list