Well, I did not check it up with concrete Arabic cultures because there are different kind of Arabic numerals. From elementary school children remember that
our Western numerals we always used — 0123456789 — are called Arabic Numerals. (Is it a surprise for you? :-))
Is there something "more Arabic"? Of course, later on I came across the numerals:
٠ ١ ٢ ٣ ٤ ٥ ٦ ٧ ٨ ٩
Decimal separator: '٫', thousand separator: '٬'.
(I had to enclose them in PRE block because it's pretty hard to edit a mix of left-to-right and right-to-left Unicode characters.)
There are different variants of the Hindu-Arabic numeral system.
First variant is called "Western Arabic", second one — "Eastern Arabic", according to
http://en.wikipedia.org/wiki/Glyphs_used_with_the_Hindu-Arabic_numeral_system[
^]. About Eastern Arabic, see
http://en.wikipedia.org/wiki/Eastern_Arabic_numerals[
^].
So, do you need Eastern Arabic?
One could expect that right representation could be obtained using correct culture for string numeric format:
int myInteger =
string cultireId =
string num = myInteger.ToString(new System.CultureInfo(cultureId));
int cultireId =
CultureInfo culture = new CultureInfo(cultureId);
But what culture should be used to obtain Eastern Arabic? I don't know; and I don't know if such support exist in .NET.
If not, this is easy to work around. These digits are represented by the Unicode code point range 0x0660 to 0x0669 (representing 0 to 9), followed by Arabic percent sign, decimal separator and thousand separator. So, a simple conversion could be used:
const UInt16 shift = 0x0660 - 0x0030;
string EasternArabic(int value) {
System.Text.StringBuilder sb = new System.Text.StringBuilder();
foreach(char input in neutral) {
UInt16 codePoint = Convert.ToUInt16(input);
codePoint += shift;
sb.Append(Convert.ToChar(codePoint));
}
return sb.ToString();
}
See
http://unicode.org/[
^].
—SA