-
-
Notifications
You must be signed in to change notification settings - Fork 483
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
iso code for locales config not used #499
Comments
This issue as been imported as question since it does not respect nuxt-i18n issue template. Only bug reports and feature requests stays open to reduce maintainers workload. |
https://github.com/nuxt-community/nuxt-i18n/blob/master/src/plugins/main.js#L243 Here check the browser language is in
But didn't use iso code. |
Code looks fine to me. Please provide reproducion on https://codesandbox.io because I don't understand what problem do you see here. |
@rchl Review please. https://codesandbox.io/s/codesandbox-nuxt-rng17 When don't set a cookie, it always choose English not depending on the http header You can use the following command for environment replication.
You can see two 302 redirects happend.
|
In a locale defined this way:
The |
The |
@rchl Ok, thank you. Would you mind adding an alias configuration for router path or domain name? Like apple.com: For example:
|
alias is country code. |
Like next-i18next's localeSubpaths. https://github.com/isaachinman/next-i18next#5-locale-subpaths |
It probably makes sense to have something like that but would have to figure out how to best implement it. Browser language detection needs to be considered also - currently it only looks at first two characters of accept-language token. |
I'm wondering what motivation was behind the decision to use only the first two characters? |
https://github.com/nuxt-community/nuxt-i18n/blob/3a64fdad274571f160046f08f861aa7c3c4d7a15/src/helpers/utils.js#L15
The text was updated successfully, but these errors were encountered: