[v9.8.0] Suppressing automatic locale fallback with !
breaks n
/$n
number formatting
#1641
Open
4 tasks done
Labels
🍰 p2-nice-to-have
Priority 2: nothing is broken but it's worth addressing
Status: Proposal
Request for comments
Type: Feature
Includes new features
Reporting a bug?
The docs describe adding an exclamation mark to
locale
to prevent vue-i18n from falling back to language parts when a regional/dialect match isn't found (e.g.en
fromen-US
). While this is supported by the standardt
/$t
translator, it breaks the numericn
/$n
formatter entirely, apparently due to passing the configuredlocale
directly tonew Intl.NumberFormat(locale, ...)
.Expected behavior
n
/$n
should behave the same ast
/$t
, and no error should occur.Reproduction
https://stackblitz.com/edit/vitejs-vite-uyzmvt?file=src%2Fmain.ts,src%2FApp.vue
System Info
Screenshot
No response
Additional context
No response
Validations
The text was updated successfully, but these errors were encountered: