I have this function
var map =
[
"&\#1632;","&\#1633;","&\#1634;","&\#1635;","&\#1636;",
"&\#1637;","&\#1638;","&\#1639;","&\#1640;","&\#1641;"
];
function getArabicNumbers(str)
{
var newStr = "";
str = String(str);
for(i=0; i<str.length; i++)
{
newStr += map[parseInt(str.charAt(i))];
}
return newStr;
}
which is taken from How can I view Arabic/Persian numbers in a HTML page with strict doctype?
This function will only work if you put something between the parenthesis in getArabicNumbers()
when you call out for it.
I want to apply this function on the document from its beginning to its end! how can I do that? Is it possible in javascript? do you recommend it?
any other way to replace English numbers to Arabic numbers using javascript (on the full page not on a string)?