You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Good catch! I think we should likely separate them out semantically: the price (a Number, 100 in this example), and the currency (an enum, USD in this example). We can then separately evaluate the currency to understand how to present it
Description
The currency symbol and number formatting need to handle i18n.
Use Intl.NumberFormat to enable language-sensitive number formatting.
Locale will need to be retrieved, code example.
A product-price-currency entry will need to be specified in the config to display the correct currency symbol:
Since the currency symbol's position is dynamic it will need to be the same size as the number.
cc @newmuis who may have more context on i18n.
Alternatives Considered
product-price as a string that includes currency symbol and number formatting.
This makes validation and number formatting complex.
Additional Context
We do not want to support currency conversion - that would require a request to an API.
No response
The text was updated successfully, but these errors were encountered: