Calendars in other languages

by Michael S. Kaplan, published on 2005/12/02 03:01 -05:00, original URI: http://blogs.msdn.com/b/michkap/archive/2005/12/02/498876.aspx


The other day, Izzy asked in the microsoft.public.dotnet.internationalization newsgroup:

I want to use a calendar web control that will display a non-gregorian calendar. When setting the CultureInfo.DateTimeFormat.Calendar = new Calendar() it works but the language is the Culture's language, and I want it to be displayed in English. E.g. When trying to display a Hebrew Calendar I will use the following code in Page_Load:

CultureInfo ilCulture = new CultureInfo("he-IL");
ilCulture.DateTimeFormat.Calendar = new HebrewCalendar();
Thread.CurrentThread.CurrentCulture = ilCulture;

This will display a HebrewCalendar but the HebrewCalendar will be displayed in Hebrew, and I want it to be displayed in English. Is it possible? How?

Those of you who are familiar with the limitations of calendars, or those of you following issues here probably know, the answer is not a happy one for Izzy -- there is no way to do it.

The only fully localized calendar is the Gregorian calendar. Thinking back to yesterday when I asked What Language to Use?, the native language is the only one present for most calendars, the localized name is there for Gregorian only, and the English name is not available anywhere.

Though to be honest, it bothers me more that the Hijri calendar is always in Arabic (even in the Divehi language's locale, where it makes no sense) than the Hebrew calendar is always in Hebrew. Because truthfully in the context of the Hebrew calendar it is in the most sensible language already, and having it in localized or even English form is not quite as important....

In any case, yet another way that calendars are not all there yet in Windows and the .NET Framework? :-(

 

This post brought to you by "ק" (U+05e7, HEBREW LETTER QOF)


# Ilya on 2 Dec 2005 4:11 AM:

Outlook has a translation of the Hebrew calendar to English, but this of course bears no relevance to the .NET question.

# David on 2 Dec 2005 7:35 AM:

An interesting thing I ran across the other day. If you have your UI language set to one language and your locale set to another, you get a mixed effect in the Windows calendar. See http://www.flickr.com/photos/exold/69341695/ for an example (here I have UI language = Spanish (Mexico), locale = French (France)). Note the month name.
This is probably as intended, but it looks a little weird.

# Michael S. Kaplan on 2 Dec 2005 7:47 AM:

Hi David -- That particular calendar is largely broken, it should not be using the UI language there. That problem is being addressed in Vista.... And note this happens only for Gregorian, which actually has the loocalizable strings for locales (the UI language strings would not be used here).

# Michael S. Kaplan on 2 Dec 2005 7:50 AM:

Hi Ilya --

Outlook does that sort of thing by providing their own support here rather than using the support in Windows or the .NET Framework. :-)

# orcmid on 2 Dec 2005 12:45 PM:

This is juicy stuff. Now you've got me champing at the bit to start pulling material together on situating data and non-psychic interaction design. There's a book or something in all of this.

But, but, there's already too much to do and too many promises to keep. Ah well, I can keep reading and building my clipping files of all of these goodies ... [;<).

referenced by

2011/04/06 The example was wrong, but the point of the example was spot on!

2005/12/21 New in Windows Vista: updates to clock and calendar

go to newer or older post, or back to index or month or day