@@ -131,6 +131,21 @@ When using Domain Routing, if a user with the `Accept-Language` header `fr;q=0.9
When using Sub-path Routing, the user would be redirected to `/fr`.
### Disabling Automatic Locale Detection
The automatic locale detection can be disabled with:
```js
// next.config.js
module.exports={
i18n:{
localeDetection:false,
},
}
```
When `localeDetection` is set to `false` Next.js will no longer automatically redirect based on the user's preferred locale and will only provide locale information detected from either the locale based domain or locale path as described above.
## Accessing the locale information
You can access the locale information via the Next.js router. For example, using the [`useRouter()`](https://nextjs.org/docs/api-reference/next/router#userouter) hook the following properties are available: