Click here to Skip to main content
13,191,877 members (43,944 online)
Rate this:
Please Sign up or sign in to vote.
See more:
I have a web application and its in Arabic. I changed my language to Arabic through Regional Settings. Now, FireFOx shows arabic text but number stil in english. I want all the numbers to encode to arabic by automatically. please anybody help me?????

in IE,its working fine...
please help me
Posted 29-Jun-11 0:12am
Rate this: bad
Please Sign up or sign in to vote.

Solution 1

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[^]. About Eastern Arabic, see[^].

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));
//using a different constructor:
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;
    return sb.ToString();


Rate this: bad
Please Sign up or sign in to vote.

Solution 2

I got the solution.

i changed the Firefox configuration like this

Type " about:config " in the address bar of Firefox.
then take bidi-numeral and change its value to 3 or 4. it wil automatically change all numbers to arabic number.
No need to do anything in the program..


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

  Print Answers RSS
Top Experts
Last 24hrsThis month

Advertise | Privacy |
Web01 | 2.8.171017.2 | Last Updated 30 Jun 2011
Copyright © CodeProject, 1999-2017
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100