Click here to Skip to main content
15,891,567 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I've a crystal report in visual studio 2010 in which I'm displaying some numeric values. I want to display those values in arabic language on server and client machine without regional and language configuration on respective machine.
Posted
Comments
Sergey Alexandrovich Kryukov 6-Oct-13 3:30am    
In Western culture, "1234567890" are called "Arabic". So, what do you mean? Do you mean "٠‎ - ١‎ - ٢‎ - ٣‎ - ٤‎ - ٥‎ - ٦‎ - ٧‎ - ٨‎ - ٩‎"?
We call them "Indo-Arabic", or "Eastern Arabic"...
—SA

1 solution

Please see my comment to the question. If this is what you mean, I'm not sure if formatting numbers to any certain culture will do the trick, most likely it will leave Arabic numbers Arabic, won't convert them to Easter Arabic. However, the conversion would be quite trivial. You can notice that Eastern Arabic numerals are ordered in the same way as Western (0 to 9) and take the code point range of 0660 to 0669, that is, they differ from Latin numerals, historically encoded as ASCII, only by constant shift ("0"-"9" take the range 0030 to 0029).

Please see:
http://www.unicode.org/charts/PDF/U0600.pdf[^],
http://www.unicode.org/charts/PDF/U0000.pdf[^].

Some code sample can be found here, you can check it up:
http://stackoverflow.com/questions/8926792/converting-numbers-from-western-arabic-digits-1-2-3-to-eastern-arabic-digit[^].

Basically, you first format all numerals in Western style, obtain a string, and then shift the code points, but only for digits.

See also: http://en.wikipedia.org/wiki/Arabic_numerals[^].

—SA
 
Share this answer
 
v3
Comments
mimtiyaz 7-Oct-13 1:02am    
Thanks for your help. It worked.
Sergey Alexandrovich Kryukov 7-Oct-13 1:53am    
It's a pleasure to help someone who can actually use the help and make things happen.
Good luck, call again.
—SA

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900