'Is there a way to use next-i18next without Next.js internationalized routing?
I'm using next-i18next package in couple of projects already and it works great.
In my current project I need to integrate i18n, but this time only with cookie support, without internationalized routing and I wonder if I can achieve that with this package or I should go back to react-i18next and i18next
Sample:
// No cookie or EN cookie
https://app.example.com shows EN version
// Cookie `next-i18n-lang` set to specific language (IT, DE, etc)
https://app.example.com shows translated version
I assume we can't use next/router locale out of the box, but that's acceptable as downside of the integration.
Solution 1:[1]
You can disable the feature by setting localeDetection to false.
// next.config.js
module.exports = {
i18n: {
localeDetection: false,
},
}
https://nextjs.org/docs/advanced-features/i18n-routing#disabling-automatic-locale-detection
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|---|
| Solution 1 | EthanDevelops |
