-
-
Notifications
You must be signed in to change notification settings - Fork 350
New issue
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
Use different locale for number and date formatting than current locale #2053
Comments
Did anyone had a chance to look at this? It is kinda crucial that it is impossible to format a currency like this: Also I create another feature request because each locale creates tons of duplicate code which might be related if doing a refactoring: #2054 |
In The Netherlands (and other Dutch speaking countries) we use this format: I feel like the most intuitive solution for this issue would be applying the same rules that we use with |
After looking into this, I think we already do this 🤔 (I haven't tested it though) |
Do you envision using fallbackLocale as follows? const i18n = createI18n({
fallbackLocale: {
en: ["de"],
default: "en"
},
messages: {
'en': {
language: 'Language',
money: 'Money'
},
'ja': {
language: '言語',
money: 'お金'
},
},
numberFormats: {
'ja': {
currency: {
style: 'currency',
currency: 'JPY',
currencyDisplay: 'symbol'
}
},
'de': {
currency: {
style: 'currency',
currency: 'EUR',
currencyDisplay: 'symbol'
}
}
}
}) |
Clear and concise description of the problem
1.000,00 €
en
€1,000.00
instead of1.000,00 €
Suggested solution
The problem is that even when trying to format 'en' with
Intl.NumberFormat
to a European format it is not possible. So the only solution I could imagine is to be able to set a different locale for translations and for number formatting.Alternative
No response
Additional context
No response
Validations
The text was updated successfully, but these errors were encountered: