For "bn" and "ne" cultures, currency formatting can not be performed

Team,

For a particular set of culture and currency, neither currency symbol nor value is shown for numeric control (exception is thrown). 
Also, formatting using internationalization library also cannot be performed for these cultures.

1. Culture: "bn", Currency: "BDT" (Bangladesh)
2. Culture: "ne", Currency: "NPR" (Nepal)

In case of numeric control, there is an exception: Cannot convert undefined or null to object
    at Function.keys (<anonymous>)

In case of formatting using internationalization, unusual value is returned. (In demo project click on button)

Can you please suggest some fix? I have attached a project that demonstrate the issue.

Thanks
Tuariq


Attachment: CurrencySymbolfailToLoad_74221b95.zip

1 Reply 1 reply marked as answer

BC Berly Christopher Syncfusion Team June 17, 2020 01:29 PM UTC

Hi Tuariq, 
  
Greetings from Syncfusion support. 
  
We have checked the provided sample and the reported issue is caused due to required CLDR-data files are not loaded properly in your application. We would like to inform you that, for localizing the NumericTextBox component, we need below mentioned files and its available under main and supplemental folder insider the CLDR-data.  
  
·       numbers.json – under the cldr-data\main 
·       timeZoneNames.json – under cldr-data\supplemental 
·       currencies.json - under the cldr-data\main 
·       numberingSystems.json – under cldr-data\supplemental 
  
But you have refereed all the files from the main folder. So, we suggest you to change the below mentioned code to get rid of the reported issue at your end. 
  
  loadCultureFiles(namestringbase?: boolean) { 
      if (name === 'en-US') { 
          return; 
      } 
      let files = [ 'numbers.json''timeZoneNames.json''currencies.json','numberingSystems.json']; 
      let loadCulture = function (propany) { 
          let valstringajaxAjax; 
          if (prop === files.length - 1) { 
              ajax = new Ajax('http://localhost:4200/assets/cldr-data/supplemental/' + files[prop], 'GET'false); 
          } else { 
              ajax = new Ajax('http://localhost:4200/assets/cldr-data/main/' + name + '/' + files[prop], 'GET'false); 
          } 
          ajax.onSuccess = function (valueany) { 
              val = value; 
              loadCldr(JSON.parse(val)); 
          }; 
          ajax.send(); 
 
      }; 
      for (let prop = 0prop < files.lengthprop++) { 
          loadCulture(prop); 
      } 
  } 
} 
 
  
Please find the modified sample from the below link. 
  
To know more about globalization for NumericTextBox component, please refer the below documentation link. 
  
Regards, 
Berly B.C 


Marked as answer
Loader.
Up arrow icon