Skip to content

Commit 7cd9ee1

Browse files
committed
docs: Wording
1 parent 89a9fdd commit 7cd9ee1

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

docs/src/pages/docs/routing.mdx

+1-1
Original file line numberDiff line numberDiff line change
@@ -440,7 +440,7 @@ export const routing = defineRouting({
440440

441441
In this case, only the locale prefix and a potentially [matching domain](#domains) are used to determine the locale.
442442

443-
### `localeCookie`
443+
### `localeCookie` [#locale-cookie]
444444

445445
If a user changes the locale to a value that doesn't match the `accept-language` header, `next-intl` will set a session cookie called `NEXT_LOCALE` that contains the most recently detected locale. This is used to [remember the user's locale](/docs/routing/middleware#locale-detection) preference for subsequent requests.
446446

docs/src/pages/docs/routing/navigation.mdx

+4-1
Original file line numberDiff line numberDiff line change
@@ -168,7 +168,10 @@ Unknown routes will be passed through as-is, but will receive relevant locale pr
168168

169169
<Details id="link-prefetching">
170170
<summary>How does prefetching of localized links work?</summary>
171-
Just like `next/link`, by default all links are prefetched. The one exception to this is that links to other locales aren't prefetched, because this may result in prematurely overwriting the locale cookie.
171+
172+
`<Link />` from `next-intl` inherits the default prefetch behavior from `next/link`.
173+
174+
The one exception to this is when you've set the `locale` prop. In this case, the link will not be prefetched, because this would otherwise result in prematurely overwriting the [locale cookie](/docs/routing#locale-cookie) as part of the prefetch request.
172175

173176
</Details>
174177

0 commit comments

Comments
 (0)