I have a multilingual ASP.NET site; one of the languages is Arabic (ar-SA). To switch between cultures, I use this code:
Thread.CurrentThread.CurrentCulture = CultureInfo.CreateSpecificCulture(Name) Thread.CurrentThread.CurrentUICulture = New CultureInfo(Name)
When displaying the date of an article, for example, I just do this, and the localization API takes care of everything:
<%#Eval('DatelineDate','{0:d MMMM yyyy}')%>
The problem is that this displays dates using the Hijiri (Islamic) calendar (e.g. the year 2008 is rendered as 1429). The client wants to display the dates using the Gregorian calendar (still rendering the month names and everything else in Arabic, of course). How can I do this?
Answer:
Turns out the ar-SA culture is the only one to use the Hijiri calendar; all the other Arabic cultures use Gregorian. Here are the different date formats in Arabic (a bit messed up because WMD doesn’t support seem to support RTL text).
And for what it’s worth here’s the quick & dirty code I used to generate this list:
More cultures at http://www.massimilianobianchi.info/max/articles/22/UI-culture-list-and-codes.aspx