-
-
Notifications
You must be signed in to change notification settings - Fork 762
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
Server language detection not working in Safari (dependency update needed) #682
Comments
@timonweber Presently, this line creates a type clash between Any good with TS? Feel like contributing? |
@isaachinman Not good enough probably, I’m still learning. But I guess you solved that issue already by yourself. Thank you very much for the fast action! 🙂 |
It's still not working for me after updating to 4.3.0 😞 |
@Kenpa Can you create a reproducible example? @timonweber Is the issue resolved on your end? |
I just updated to 4.3.0, run next server.js (custom server), and still got english content instead of french in Safari... Works fine in Chrome and Firefox |
@isaachinman Sorry for the late reply. Unfortunately the problem is still present on my end. But I had a deeper look into it and it seems that this issue is not only related to the casing of the language string but also to the presence of a region code. For example: When I configure an app with a default language of So this issue seems to be not only present in Safari, but in every client where the only parameter in But maybe this issue should be addressed to |
Check the configuration options. Specifically, |
@isaachinman Sorry, I totally missed that option! I tested it again and yes, everything is working as expected after the update. Both Thanks again! 🙂 |
@isaachinman Sorry, missed that option too! Works fine now! Just one thing that seems odd to me in Safari: when i try to get the current language with |
Please raise any questions like that via StackOverflow, or via the relevant i18next repository. |
Hi @timonweber @isaachinman, could you please explain where to put that option to get the right language? We're having the same behaviour, when getting |
Describe the bug
Safari is sending the
Accept-Language
in a lowercase manner (e.g.en-us
). Because the current used version ofi18next-express-middleware
detects this string asen-
instead ofen
the sever language detection is not working as expected.Occurs in next-i18next version
4.2.1
Additional context
This issue has been discussed here and got fixed in
i18next-express-middleware@1.7.1
. Is it possible to bump the dependency to a recent version? Thanks!The text was updated successfully, but these errors were encountered: