3

I've got some sort of issue that never faced before. I've moved a website which has two languages (English/Arabic) from one server to another, everything works fine except the Date Globalization. I am using ar-AE, and when I convert Date using this format, it just returns English version. But if I use ar-SA, it will return Arabic format but in Hijri Calendar, which is what I don't want. If you don't know, ar-AE will not convert date to Hijri date and instead just changes the notation to Arabic. I am using .Net framework 3.5 SP1.

Example:

Response.Write(DateTime.UtcNow.ToString("dddd MMMM dd, yyyy",System.Globalization.CultureInfo.CreateSpecificCulture("ar-AE")));

Anybody has idea how to overcome this issue?

MJ Fathinia
  • 259
  • 2
  • 11

1 Answers1

0
public void Page_Load()
  { 
Thread.CurrentThread.CurrentCulture = new CultureInfo("ar-AE");

  }

if it works then you should check your server settings . if you can't modify them you should put this piece of code in your global.asax in the Application_BeginRequest

further instructions here

of course i assumed here it was an asp.net issue but if it's a winform/wpf issue it will work the same way you'll just have to find the proper events to add this piece of code.

Note that adding this to your page or your global.asax will affect either the whole page or the whole site.

Community
  • 1
  • 1
  • The issue is, I have already this in my page, and everything is working fine in the simulated environment and also in my local server, but on that specific server, there is only issue with ar-AE. I was wondering maybe changes on the server settings caused some this issue. – MJ Fathinia Aug 21 '11 at 06:02