What my issue is that my client will enter the values in any other language. suppose marathi. i need to create bill according to input. what i have done is i took the input taken by user as string and assigned value to them this is working till 0-9 but what about 10, 100, 1000 and so on.. here is my code,plz suggest
function convert_number()
{
var no1 = document.getElementById('rate').value
if(no1 == "०")
{
no1 = 0;
alert(no1);
}
else if(no1 == "१")
{
no1 = 1;
alert(no1);
}
else if(no1 == "२")
{
no1 = 2;
alert(no1);
}
else if(no1 == "३")
{
no1 = 3;
alert(no1);
}
else if(no1 == "४")
{
no1 = 4;
alert(no1);
}
else if(no1 == "५")
{
no1 = 5;
alert(no1);
}
else if(no1 == "६")
{
no1 = 6;
alert(no1);
}
else if(no1 == "७")
{
no1 = 7;
alert(no1);
}
else if(no1 == "८")
{
no1 = 8;
alert(no1);
}
else if(no1 == "९")
{
no1 = 9;
alert(no1);
}
else
{
alert('invalid')
}
}