Skip to content

Commit 6d94a9e

Browse files
committed
docs: fix toc, note in gdpr release notes [skip ci]
1 parent 8cce53e commit 6d94a9e

File tree

2 files changed

+9
-3
lines changed

2 files changed

+9
-3
lines changed

docs/src/pages/blog/_meta.tsx

+4
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,10 @@ export default {
22
index: {
33
title: 'Overview'
44
},
5+
'next-intl-4-0': {
6+
title: 'next-intl 4.0',
7+
display: 'hidden'
8+
},
59
'next-intl-3-22': {
610
title: 'next-intl 3.22',
711
display: 'hidden'

docs/src/pages/blog/next-intl-4-0.mdx

+5-3
Original file line numberDiff line numberDiff line change
@@ -154,9 +154,9 @@ t('followers', {count: 30000});
154154

155155
Due to a current limitation in TypeScript, this feature is opt-in for now. Please refer to the [strict arguments](/docs/workflows/typescript#messages-arguments) docs to learn how to enable it.
156156

157-
## GDPR compliance
157+
## GDPR compliance [#gdpr-compliance]
158158

159-
In order to comply with the current GDPR regulations, the following changes have been made:
159+
In order to comply with the current GDPR regulations, the following changes have been made if you're using the `next-intl` middleware for i18n routing:
160160

161161
1. The locale cookie expiration has been decreased to 5 hours.
162162
2. The locale cookie is now only set when a user switches to a locale that doesn't match the `accept-language` header.
@@ -178,6 +178,8 @@ export const routing = defineRouting({
178178
});
179179
```
180180

181+
Since the cookie is now only available after a locale switch, make sure to not rely on it always being present. E.g. if you need access to the user's locale in a [Route Handler](/docs/environments/actions-metadata-route-handlers#route-handlers), a reliable option is to provide the locale as a search param (e.g. `/api/posts/12?locale=en`).
182+
181183
As part of this change, disabling a cookie now requires you to set [`localeCookie: false`](/docs/routing#locale-cookie) in your routing configuration. Previously, `localeDetection: false` ambiguously also disabled the cookie from being set, but since a separate `localeCookie` option was introduced recently, this should now be used instead.
182184

183185
Learn more in the [locale cookie](/docs/routing#locale-cookie) docs.
@@ -188,7 +190,7 @@ The build output of `next-intl` has been modernized and now leverages the follow
188190

189191
1. **ESM-only:** To enable enhanced tree-shaking and align with the modern JavaScript ecosystem, `next-intl` is now ESM-only. The only exception is `next-intl/plugin` which is published both as CommonJS as well as ESM, due to `next.config.js` still being popular.
190192
2. **Modern JSX transform:** The peer dependency for React has been bumped to v17 in order to use the more efficient, modern JSX transform.
191-
3. **Modern syntax:** Syntax is now compiled down to the Browserslist `defaults` query, which is a shortcut for `>0.5%, last 2 versions, Firefox ESR, not dead`—a baseline that is considered a reasonable target for modern apps.
193+
3. **Modern syntax:** Syntax is now compiled down to the Browserslist `defaults` query, which is a shortcut for ">0.5%, last 2 versions, Firefox ESR, not dead"—a baseline that is considered a reasonable target for modern apps.
192194

193195
With these changes, the bundle size of `next-intl` has been reduced by ~7% ([all details](https://github.com/amannn/next-intl/pull/1470)).
194196

0 commit comments

Comments
 (0)