i18n
i18n copied to clipboard
[NEXT] "prefix" strategy not working
Version
@nuxtjs/i18n: ^8.0.0-alpha.2 nuxt: 3.0.0-rc.8
Nuxt configuration
- [x] Applies to a site deployed to a static server (site generated with
nuxt generate
) - [ ] Applies to a site deployed to a server with a Node backend
@nuxtjs/i18n configuration
Reproduction Link
https://codesandbox.io/s/nuxt-nuxtjs-i18n-base-template-forked-5wy2yj
Steps to reproduce
Set strategy: 'prefix'
in @nuxtjs/i18n
config
What is Expected?
I want each path to start with the appropriate prefix, and the url without the prefix points to the default language, as it was in the Nuxt 2 version.
What is actually happening?
Leaves unnecessary routes.
Thank you for your reporting!
Maybe, that is same issue. https://github.com/nuxt-community/i18n-module/issues/1555
Please try v8.0.0-alpha.4 when it is released. If you want to use it right away, try the edge version.
@kazupon I have the same issues strategy: 'prefix'
doesn't work:
Versions:
"nuxt": "3.0.0-rc.12"
"@nuxtjs/i18n": "^8.0.0-beta.1"
@kazupon Sorry for the late response. I updated @nuxtjs/i18n
to ^8.0.0-alpha.4
and nuxt
to 3.0.0-rc.11
(rc11 surprisingly it doesn't crash), but the paths are still generated the same 😕:
Update: In ^8.0.0-beta.2
this strategy still don't work 😥
@kazupon I can see that this has already been fixed in the o edge version. Thanks! Unfortunately, auto-redirection does not work (I get 404 error). Even after manually setting the i18n_redirected
cookie to 'en'
. I don't want to create an additional issue on this detail, but would appreciate a fix for it. Thank you in advance!
I've just released v8.0.0-beta.3 close