andyearnshaw / Intl.js

Compatibility implementation of the ECMAScript Internationalization API (ECMA-402) for JavaScript -- UNMAINTAINED
Other
1.7k stars 215 forks source link

currencydisplay: "name" not working #343

Open nicosayer opened 4 years ago

nicosayer commented 4 years ago

I need to display the currency name but it looks like it doesn't work.

The following code returns EUR 123.00 instead of 123.00 euros :

new Intl.NumberFormat('en-US', { style: 'currency', currency: 'EUR', currencyDisplay: 'name' }).format('123')

Is there something I forgot or any known work-around ?