Thursday, May 12, 2011

[Actionscript] Function to translate a number into number of Indic or non-english numerals.

This function is very Useful in displaying numbers in Indic Languages.
Input: Any Number in English.
Output: String in Hindi/Any Language Used in the variable devNum.
Environment: Flash/Actionscript 2.0

function fnTranslate(param){
var num = param.toString();
 //Assuming the user input is a valid natural number in English.
var devNum:String="०१२३४५६७८९"; 
 //replace this string by Indic/Non-English numerals
var strOut="";
return strOut;

No comments:

Post a Comment