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
Is your feature request related to a problem? Please describe.
Currently, all formatting logic uses the locale inferred from the context. This causes a problem when formatting requires a more specific locale code. For an example, the ar locale (Arabic) does not localize numbers into Arabic, and you have to explicitly change the locale name to ar-SA, which is not the desired url code
Describe the solution you'd like
Add a new config option to both getRequestConfig and NextIntlClientProvider called formattingLocale that is used for formatting
Describe alternatives you've considered
Manually doing rewrites in the middleware from /ar to /ar-SA internally, but that requires changing a lot of code using <Link /> and useRouter
The text was updated successfully, but these errors were encountered:
This is discussed in #653. I'm aiming for built-in support for this eventually, but you can learn about workarounds that can be used currently in the issue (including a community-maintained package that wraps relevant parts from next-intl).
Is your feature request related to a problem? Please describe.
Currently, all formatting logic uses the
locale
inferred from the context. This causes a problem when formatting requires a more specific locale code. For an example, thear
locale (Arabic) does not localize numbers into Arabic, and you have to explicitly change the locale name toar-SA
, which is not the desired url codeDescribe the solution you'd like
Add a new config option to both
getRequestConfig
andNextIntlClientProvider
calledformattingLocale
that is used for formattingDescribe alternatives you've considered
Manually doing rewrites in the middleware from
/ar
to/ar-SA
internally, but that requires changing a lot of code using<Link />
anduseRouter
The text was updated successfully, but these errors were encountered: