question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

using from translation routing excluded route and defaultLocale together leads to reload loop on this page(s)

See original GitHub issue

Version

nuxt-i18n: 6.13.1 nuxt: 2.13.0

Nuxt configuration

mode:

  • universal
  • spa

Nuxt-i18n configuration

configuration
i18n: {
    locales: [
      {
        code: 'en',
        iso: 'en-GB',
        isCatchallLocale: true
      },
      {
        code: 'de',
        iso: 'de-CH'
      }
    ],
    defaultLocale: 'en',
    strategy: 'prefix',
    vueI18n: {
      fallbackLocale: 'en'
    },
    detectBrowserLanguage: {
      useCookie: true,
      cookieKey: 'i18n_redirected'
    },
    parsePages: false,
    pages: {
      admin: false
    }
}

Reproduction Link

let me know and I’ll commit my test setup for this… EDIT: https://git.violoncello.ch/websites/repro-nuxti18n-798

Steps to reproduce

  • create a admin.vue file in /pages with some demo content
  • access /admin -> gets redirected to /en/admin/ which is not found
  • access /admin/ -> leads to a reload loop (browser is reloading the page constantly)

What is Expected?

If I didn’t get something wrong, I should be able to set defaultLocale as recommended and use it together with parsePages: false, pages: { admin: false } }

What is actually happening?

the route which is from localization routing excluded isn’t accessible (as described above)

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:8

github_iconTop GitHub Comments

1reaction
rchlcommented, Jul 31, 2020

Published now.

(Thanks for pointing it out that it’s not released. I’ve actually released it but at different name accidentally. 😃).

0reactions
violoncelloCHcommented, Jul 31, 2020

wow, that was fast! 🎉 thank you very much! I guess the release will be available soon via npm…

Read more comments on GitHub >

github_iconTop Results From Across the Web

using from translation routing excluded route and defaultLocale ...
using from translation routing excluded route and defaultLocale together leads to reload loop on this page(s) #798. Closed. 1 of 2 tasks.
Read more >
Advanced Features: Internationalized Routing - Next.js
If a locale other than the default locale is detected, the user will be redirected to either: When using Sub-path Routing: The locale...
Read more >
Rails Internationalization (I18n) API - Ruby on Rails Guides
The I18n library will use English as a default locale, i.e. if a different locale is not set, :en will be used for...
Read more >
AOS-CX 10.07 Command-Line Interface Guide
Management port (out-of-band connection). Connect the management port on the switch to your network, and then use SSH client software to reach.
Read more >
Disable localization for a route - i18n in Next.js - Stack Overflow
There is ignoreRoutes property in i18n plugin config i18n: { defaultLocale: 'en', locales: availableLocalesMap, ignoreRoutes: [ '/blog/', ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found