Skip to content

Commit 89a9fdd

Browse files
committed
docs: Improve wording
1 parent ca02e3d commit 89a9fdd

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

docs/src/pages/docs/routing.mdx

+6-4
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,7 @@ In this case, requests for all locales will be rewritten to have the locale only
107107
2. [Alternate links](#alternate-links) are disabled in this mode since URLs might not be unique per locale. Due to this, consider including these yourself, or set up a [sitemap](/docs/environments/actions-metadata-route-handlers#sitemap) that links localized pages via `alternates`.
108108
3. You can consider increasing the [`maxAge`](#locale-cookie) attribute of the locale cookie to a longer duration to remember the user's preference across sessions.
109109

110-
#### Custom prefixes [#locale-prefix-custom]
110+
#### `prefixes` [#locale-prefix-prefixes]
111111

112112
If you'd like to customize the user-facing prefix, you can provide a locale-based mapping:
113113

@@ -160,7 +160,9 @@ If you'd like to encode custom information in the locale, you can use arbitrary
160160

161161
### `pathnames` [#pathnames]
162162

163-
Many apps choose to localize pathnames, especially when search engine optimization is relevant, e.g.:
163+
Many apps choose to localize pathnames, especially when search engine optimization is relevant.
164+
165+
**Example:**
164166

165167
- `/en/about`
166168
- `/de/ueber-uns`
@@ -251,7 +253,7 @@ revalidatePath('/de/news/some-article');
251253
revalidatePath('/de/neuigkeiten/some-article');
252254
```
253255

254-
When in doubt, you can revalidate both paths to be on the safe side.
256+
When in doubt, you can revalidate with `revalidateTag` instead.
255257

256258
See also: [`vercel/next.js#59825`](https://github.com/vercel/next.js/issues/59825)
257259

@@ -323,7 +325,7 @@ If you want to serve your localized content based on different domains, you can
323325
- `ca.example.com/fr`: `fr-CA`
324326
- `fr.example.com`: `fr-FR`
325327

326-
In many cases, `domains` are combined with a [`localePrefix`](#locale-prefix) setting to achieve results as shown above. Also [custom prefixes](#locale-prefix-custom) can be used to customize the user-facing prefix per locale.
328+
In many cases, `domains` are combined with a [`localePrefix`](#locale-prefix) setting to achieve results as shown above. Also [custom prefixes](#locale-prefix-prefixes) can be used to customize the user-facing prefix per locale.
327329

328330
```tsx filename="routing.ts"
329331
import {defineRouting} from 'next-intl/routing';

0 commit comments

Comments
 (0)