More Currency Display Choices S1
- Stage: Stage 1
- Status: Active
- ECMAScript edition: —
- Synchronized: Aug 28, 2026
- 中文译文 · Source repository
This proposal aims to enhance Intl.NumberFormat's currencyDisplay option by adding two new values: 'formalSymbol' for a wider formal symbol (e.g., "US$" instead of "$") and 'never' to omit currency indicators entirely. It addresses the need to distinguish multiple currencies in one context and to save space when currency is implied.
The README below comes from the upstream repository and may contain outdated stage or status metadata. Use the proposal details above as the current source of truth.
More Currency Display Choices
Status
Champion: Eemeli Aro (Mozilla)
Stage: 2
Motivation & Use Cases
In JavaScript, localized currency formatting is made possible with Intl.NumberFormat
and its style: 'currency' option.
The indication of the currency is controlled by the currencyDisplay option,
which currently supports formatting it as
a symbol (e.g. "$" or "US$"), a narrowSymbol (e.g. "$"),
an ISO currency code (e.g. "USD"), or as a spelled-out name (e.g. "US dollars").
For symbol formatting, the choice between a "narrow" and "formal" symbol
is made per currency and per locale,
so that e.g. USD values are formatted as "$" with the en-US locale, but as "US$" with the en-CA locale.
These existing options do not support the following use cases:
-
When formatting multiple currencies in the same context (such as a web page), it should be possible to differentiate each currency with its full formal symbol, using e.g. "US$" for USD and "CA$" for CAD. However, it is not possible to format USD as "US$" in the en-US locale, as its
symbolstyle always formats as "$". [Feature request] -
When formatting currency values in a very narrow space or in a setting where the currency symbol or name is provided otherwise, it is useful to be able to omit the currency indicator completely while still using the currency formatting style to control the number of fraction digits (which dependens on the currency). The only way to do this now is by formatting to parts, and filtering out the currency symbol or code and any adjoining whitespace from the output. [Stack Overflow question]
Description
The proposed solution is to add the following two currencyDisplay option values:
formalSymbol— A wider format symbol or the ISO currency code ("US$100" rather than "$100"). An alternative spelling for this could bewideSymbol.never— Do not display any currency symbol or name.
Comparison
ICU includes
FORMAL_SYMBOL_NAME /
UCURR_FORMAL_SYMBOL_NAME
to provide the same functionality as formalSymbol:
The formal currency symbol is similar to the regular currency symbol, but it always takes the form used in formal settings such as banking; for example, "NT$" instead of "$" for TWD in zh-TW.