1

I use VS2010,C# to develop my ASP.NET web app, I want to display my numbers in Arabic/Farsi mode, I mean both markup numbers and numbers displayed through code, what are my options? I've used lang="ar", dir="rtl" but nothing changes, should my users change anything in their browsers? I've seen several sites that display Arabic numbers but I've not changed my browser settings at all! should I convert anything in my code? what about markup pages?

thanks

Ali_dotNet
  • 3,219
  • 10
  • 64
  • 115
  • 1
    Related: http://stackoverflow.com/questions/2298153/how-can-i-convert-english-digits-to-arabic-digits – Heinzi Jun 05 '12 at 16:38
  • Also related: http://stackoverflow.com/questions/3055195/string-format-not-converting-integers-correctly-in-arabic – Heinzi Jun 05 '12 at 16:46
  • thanks Heinzi, I just copied Arabic numbers instead of English numbers in my markup ASPX file, it is working fine, now I should convert something in my CS files? – Ali_dotNet Jun 05 '12 at 16:55

1 Answers1

1

I think most of this is related to users system configurations. EX: in windows vista, server 2008 control panel => region and language settings => additional settings => numbers tab => check standard digits and use native digits options

however you should be doing the following in your code:

System.Threading.Thread.CurrentThread.CurrentCulture = new CultureInfo("ar-EG");
System.Threading.Thread.CurrentThread.CurrentUICulture = new CultureInfo("ar-EG");
AHMED EL-HAROUNY
  • 836
  • 6
  • 17