Skip to content
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

alwaysRedirect in detectBrowserLanguage not working #1650

Closed
1 of 2 tasks
blouflashdb opened this issue Nov 15, 2022 · 1 comment
Closed
1 of 2 tasks

alwaysRedirect in detectBrowserLanguage not working #1650

blouflashdb opened this issue Nov 15, 2022 · 1 comment
Assignees

Comments

@blouflashdb
Copy link

blouflashdb commented Nov 15, 2022

Version

@nuxtjs/i18n: 8.0.0-beta.4
nuxt: 3.0.0-rc.13

Nuxt configuration

  • 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

i18n: {
    locales: [
      {
        code: "en",
        iso: "en-US",
        name: "lang_english",
      },
      {
        code: "de",
        iso: "de-DE",
        name: "lang_german",
      },
    ],
    defaultLocale: "en",
    detectBrowserLanguage: {
      useCookie: true,
      cookieKey: "i18n_redirected",
      redirectOn: "root",
      alwaysRedirect: true,
    },
    vueI18n: {
      legacy: false,
      locale: "en",
      messages: {
        en,
        de,
      },
    },
  },

Reproduction Link

https://github.com/blouflashdb/Awesome-Nimiq

Steps to reproduce

  • call setLocale to a different language than the default language.
  • open app root without the lang route in a new tab (http://localhost:3000/)

What is Expected?

expected to be redirected to http://localhost:3000/de because "de" is the value in the cookie.

What is actually happening?

no redirect to http://localhost:3000/de

@kazupon kazupon added the v8 label Nov 16, 2022 — with Volta.net
Copy link
Collaborator

kazupon commented Nov 19, 2022

Thank you for your reporting!
and, sorry late my reply.
I'll try to fix this issue!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants