-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
[BUG] - DateRangePicker shows error messages only in English #2993
Comments
In |
Nope, that doesn’t work either |
@GasparAdragna can you help run the following on your browser console and share the result? I was digging the react-stately code and think they retrieve the locale from the browser language setting rather than the provider.
|
The logic is actually from react-aria side after digging into the source code. function getLocale() {
// Match browser language setting here, NOT react-aria's I18nProvider, so that we match other browser-provided
// validation messages, which to not respect our provider's language.
// @ts-ignore
return (typeof navigator !== 'undefined' && (navigator.language || navigator.userLanguage)) || 'en-US';
} And I do see some people raised this issue on their repo and here are some replies from their members.
Therefore, there is not much we could do at this moment. You may have a custom |
NextUI Version
2.3.6
Describe the bug
When using the new
DateRangePicker
component with theI18nProvider
set to "es", the error messages appear in english.Your Example Website or App
No response
Steps to Reproduce the Bug or Issue
DateRangePicker
with theI18nProvider
set to "es"Expected behavior
I expect the errors to show on the locale previously set in the provider
Screenshots or Videos
No response
Operating System Version
macOS
Browser
Chrome
The text was updated successfully, but these errors were encountered: