Click here to Skip to main content
15,610,839 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
i want to do the reverse of this function i want to convert numbers from arabic to english

JavaScript
function numentofa(n) {
        var digits = [],
            r;
        do {
            r = n % 10;
            n = (n - r) / 10;
            digits.unshift(String.fromCharCode(r + 1776));
        } while (n > 0);
        return digits.join('');
        }

        window.onload = aa();

        function aa() {
            var oooook = numentofa("121");
            $('.numbers').append(oooook);
            alert(oooook);
        }
Posted
Comments
Maciej Los 22-May-13 2:15am    

Refer to link below

translate arabic to english

Although it doesnt use jquery or javascript,but i think it can help you lil bit.
 
Share this answer
 
v2
Comments
Mir Shakeel Hussain 16-May-13 3:06am    
thankx
try this
JavaScript
function arabictonum(arabicnumstr) {
    var num=0, c;
    for(var i=0; i < arabicnumstr.length; i++)
        c = arabicnumstr.charCodeAt(i);
        num += c-1776;
        num *= 10;
    }
    return num/10;
}
 
Share this answer
 
v3

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