The number to convert (can be a number or string).
If true
, converts the number to English words. Default is false
(converts to Bangla words).
The number in words.
convertToWords(123); // "একশত তেইশ"
convertToWords("123"); // "একশত তেইশ"
convertToWords("১২৩", true); // "one hundred twenty-three"
convertToWords(123.45); // "একশত তেইশ দশমিক চার পাঁচ"
convertToWords("১২৩.৪৫", true); // "one hundred twenty-three point four five"
convertToWords("০"); // "শূন্য"
convertToWords(1000000); // "দশ লক্ষ"
Converts a number to words in Bangla or English.