i18n icon indicating copy to clipboard operation
i18n copied to clipboard

[NEXT] "prefix" strategy not working

Open szulcus opened this issue 2 years ago • 1 comments

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.

image image

szulcus avatar Oct 07 '22 07:10 szulcus

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 avatar Oct 12 '22 15:10 kazupon

@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"

luthfi-hh avatar Oct 23 '22 04:10 luthfi-hh

@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 😕: image image

Update: In ^8.0.0-beta.2 this strategy still don't work 😥

szulcus avatar Oct 24 '22 10:10 szulcus

@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!

szulcus avatar Oct 30 '22 15:10 szulcus

I've just released v8.0.0-beta.3 close

kazupon avatar Oct 31 '22 17:10 kazupon