How to get currency name in simplified chinese with JavaScript

1 Answer

0 votes
const currencyNames = new Intl.DisplayNames(['zh-Hans'], {type: 'currency'});

console.log(currencyNames.of('USD'));
console.log(currencyNames.of('EUR'));

  
  
  
  
/*
run:
  
"美元"
"欧元"
  
*/

 



answered Mar 23, 2022 by avibootz
...