How do you display full currency names instead of symbols?
Use the currencyDisplay option to show 'US dollars' instead of '$'
Introduction
Currency symbols create ambiguity in international applications. The dollar sign $ represents US dollars, Canadian dollars, Australian dollars, and currencies from over a dozen other countries. Users cannot determine which currency you mean from the symbol alone.
Full currency names eliminate this confusion. Instead of showing $1,234.56, you display 1,234.56 US dollars. The currency becomes explicit and users understand exactly what they see.
JavaScript provides two approaches for displaying full currency names. You can format currency amounts with names using Intl.NumberFormat, or get standalone currency names using Intl.DisplayNames.
Format currency amounts with full names
The currencyDisplay option in Intl.NumberFormat controls how currencies appear in formatted amounts. Set it to "name" to display the full currency name.
const formatter = new Intl.NumberFormat('en-US', {
style: 'currency',
currency: 'USD',
currencyDisplay: 'name'
});
console.log(formatter.format(1234.56));
// Output: 1,234.56 US dollars
The formatter includes the complete currency name after the amount. The name follows the grammatical rules of the locale you specify.
The currencyDisplay option values
The currencyDisplay option accepts four values that determine how the currency appears.
symbol (default)
Shows a localized currency symbol.
const formatter = new Intl.NumberFormat('en-US', {
style: 'currency',
currency: 'USD',
currencyDisplay: 'symbol'
});
console.log(formatter.format(100));
// Output: $100.00
code
Shows the three-letter ISO 4217 currency code.
const formatter = new Intl.NumberFormat('en-US', {
style: 'currency',
currency: 'USD',
currencyDisplay: 'code'
});
console.log(formatter.format(100));
// Output: USD 100.00
name
Shows the full localized currency name.
const formatter = new Intl.NumberFormat('en-US', {
style: 'currency',
currency: 'USD',
currencyDisplay: 'name'
});
console.log(formatter.format(100));
// Output: 100.00 US dollars
narrowSymbol
Shows a compact symbol format without country disambiguation.
const formatter = new Intl.NumberFormat('en-US', {
style: 'currency',
currency: 'USD',
currencyDisplay: 'narrowSymbol'
});
console.log(formatter.format(100));
// Output: $100.00
The narrowSymbol option produces $ instead of US$ for US dollars. Use this when context makes the currency obvious.
How locale affects currency names
The locale you pass to Intl.NumberFormat determines the language and grammar of the currency name.
const usdollar = 1234.56;
// English
const enFormatter = new Intl.NumberFormat('en-US', {
style: 'currency',
currency: 'USD',
currencyDisplay: 'name'
});
console.log(enFormatter.format(usdollar));
// Output: 1,234.56 US dollars
// French
const frFormatter = new Intl.NumberFormat('fr-FR', {
style: 'currency',
currency: 'USD',
currencyDisplay: 'name'
});
console.log(frFormatter.format(usdollar));
// Output: 1 234,56 dollars des États-Unis
// Japanese
const jaFormatter = new Intl.NumberFormat('ja-JP', {
style: 'currency',
currency: 'USD',
currencyDisplay: 'name'
});
console.log(jaFormatter.format(usdollar));
// Output: 1,234.56 米ドル
Each locale provides its own translation of the currency name. The number format also changes according to locale conventions.
Get currency names without amounts
Use Intl.DisplayNames when you need the currency name alone without formatting an amount.
const currencyNames = new Intl.DisplayNames('en-US', {
type: 'currency'
});
console.log(currencyNames.of('USD'));
// Output: US Dollar
console.log(currencyNames.of('EUR'));
// Output: Euro
console.log(currencyNames.of('JPY'));
// Output: Japanese Yen
Pass ISO 4217 currency codes to the of() method. The method returns the localized currency name.
You can get currency names in any locale.
// Get currency names in French
const frCurrencyNames = new Intl.DisplayNames('fr-FR', {
type: 'currency'
});
console.log(frCurrencyNames.of('USD'));
// Output: dollar des États-Unis
console.log(frCurrencyNames.of('EUR'));
// Output: euro
When to use full currency names
Use full currency names in these situations.
Financial reports and statements
Display full names in financial documents where precision matters.
const formatter = new Intl.NumberFormat('en-US', {
style: 'currency',
currency: 'USD',
currencyDisplay: 'name'
});
console.log(`Total revenue: ${formatter.format(1500000)}`);
// Output: Total revenue: 1,500,000.00 US dollars
Multi-currency applications
Show full names when users work with multiple currencies simultaneously.
const currencies = [
{ code: 'USD', amount: 1000 },
{ code: 'EUR', amount: 850 },
{ code: 'GBP', amount: 750 }
];
currencies.forEach(item => {
const formatter = new Intl.NumberFormat('en-US', {
style: 'currency',
currency: item.code,
currencyDisplay: 'name'
});
console.log(formatter.format(item.amount));
});
// Output:
// 1,000.00 US dollars
// 850.00 euros
// 750.00 British pounds
Currency selection interfaces
Display currency names in dropdowns or selection lists.
const currencies = ['USD', 'EUR', 'GBP', 'JPY', 'CAD'];
const displayNames = new Intl.DisplayNames('en-US', {
type: 'currency'
});
const options = currencies.map(code => ({
value: code,
label: displayNames.of(code)
}));
console.log(options);
// Output:
// [
// { value: 'USD', label: 'US Dollar' },
// { value: 'EUR', label: 'Euro' },
// { value: 'GBP', label: 'British Pound' },
// { value: 'JPY', label: 'Japanese Yen' },
// { value: 'CAD', label: 'Canadian Dollar' }
// ]
Accessibility
Screen readers announce full currency names more clearly than symbols. Users with visual impairments understand 100.00 US dollars better than $100.00.
Use currency symbols for compact displays where space constraints exist and context makes the currency clear. Use full names when clarity and accessibility take priority.