Reputation: 55
I know I can use Intl.DisplayNames
to get the singular form (e.g. US Dollar).
const currencyNameEnUs = new Intl.DisplayNames( 'en-US', { type: 'currency' } );
const currencyCode = 'USD';
console.log( currencyNameEnUs.of( currencyCode ) );
// Expected output: "US Dollar"
But, I don't know how to pluralize the result. How do I get "US Dollars"?
Upvotes: 1
Views: 190