Skip to content

[amp story shopping] Currency i18n #37126

@processprocess

Description

@processprocess

Description

The currency symbol and number formatting need to handle i18n.

Screen Shot 2021-12-06 at 4 36 37 PM

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:

product-price: 100,
product-price-currency: ‘USD’

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

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions