We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
At the moment number formats need to be defined for every locale, but this results in duplicate code:
numberFormats: { de: { currency: { style: 'currency', currency: 'EUR', }, }, fr: { currency: { style: 'currency', currency: 'EUR', }, }, es: { currency: { style: 'currency', currency: 'EUR', }, }, }, datetimeFormats: { de: { date: { year: 'numeric', month: '2-digit', day: '2-digit', }, }, fr: { date: { year: 'numeric', month: '2-digit', day: '2-digit', }, }, es: { date: { year: 'numeric', month: '2-digit', day: '2-digit', }, }, },
This is a simple example but imagine having 27 EU countries and defining multiple date formats and all of them are the same.
Maybe something like this:
numberFormats: { currency: { style: 'currency', currency: 'EUR', locales: ['de', 'fr', 'es'], }, }, datetimeFormats: { date: { year: 'numeric', month: '2-digit', day: '2-digit', locales: ['de', 'fr', 'es'], }, },
Additionally locales could be optional: If not defined it applies to all locales.
locales
No response
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Clear and concise description of the problem
At the moment number formats need to be defined for every locale, but this results in duplicate code:
This is a simple example but imagine having 27 EU countries and defining multiple date formats and all of them are the same.
Suggested solution
Maybe something like this:
Additionally
locales
could be optional: If not defined it applies to all locales.Alternative
No response
Additional context
No response
Validations
The text was updated successfully, but these errors were encountered: