We can easily convert Standard (English) Numbers to equivalent character sets using simple replace operation. The following PHP python and JS function converts Standard numbers to Devanagari Unicode numbers. You can get numbers in other languages by simply replacing the array.

1. Convert English Number To Nepali Number Using PHP

We will change english number to nepali number through the use of str_replace() php built in function.The str_replace() function replaces some characters with another characters in a string.

function ent_to_nepali_num_convert($number){
	$eng_number = array(
	$nep_number = array(
	return str_replace($eng_number, $nep_number, $number);
echo 'The Nepali Number is : ' .ent_to_nepali_num_convert(123456789);

2. Convert English Number To Nepali Number Using Python

We can convert english number to nepali number by using replace() python built in function. We can replace multiple substrings at once using replace() method chaining.

 def convertEnglishToNepali(InpData):
        return InpData.replace('0','०')

3. Convert English Number To Nepali Number Using Javscript

If you try to convert nepali number in to english number you can easy convert using using map() javascript built in function.

function ConvEnglishToNepaliNum(number) {

        let nepaliNumbersList = ['०', '१', '२', '३', '४', '५', '६', '७', '८', '९'];    
        const numberToConvert = number.toString().split('');

        let result = numberToConvert.map((num, i) => {
        return nepaliNumbersList [i, num];

        return result.join('');

Leave Your Comment