Skip to content

fix: Deprecate setRequestLocale and add blog post on next/root-params#1632

Draft
amannn wants to merge 25 commits into
mainfrom
docs/v4-rootparams-blog-post
Draft

fix: Deprecate setRequestLocale and add blog post on next/root-params#1632
amannn wants to merge 25 commits into
mainfrom
docs/v4-rootparams-blog-post

Conversation

@amannn

@amannn amannn commented Dec 20, 2024

Copy link
Copy Markdown
Owner

Related to vercel/next.js#72837 and vercel/next.js#80255

→ Draft

TODO

Closes #663
Closes #2075

@vercel

vercel Bot commented Dec 20, 2024

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
next-intl-docs Ready Ready Preview, Comment May 15, 2026 11:34am
next-intl-example-app-router Ready Ready Preview, Comment May 15, 2026 11:34am
next-intl-example-app-router-without-i18n-routing Ready Ready Preview, Comment May 15, 2026 11:34am

Request Review

# Conflicts:
#	docs/src/pages/blog/next-intl-4-0.mdx
Comment thread docs/src/pages/blog/nextjs-root-params.mdx Outdated
Comment thread docs/src/pages/blog/nextjs-root-params.mdx Outdated
Comment thread docs/src/pages/blog/nextjs-root-params.mdx Outdated
Comment thread docs/src/pages/blog/nextjs-root-params.mdx Outdated
Comment thread docs/src/pages/blog/nextjs-root-params.mdx Outdated
Comment thread docs/src/pages/blog/nextjs-root-params.mdx Outdated
Comment thread docs/src/pages/blog/nextjs-root-params.mdx Outdated
Comment thread docs/src/pages/blog/nextjs-root-params.mdx Outdated
Comment thread docs/src/pages/blog/nextjs-root-params.mdx Outdated
Comment thread docs/src/pages/blog/nextjs-root-params.mdx Outdated
@amannn amannn changed the base branch from docs/v4-beta-blog-post to main April 29, 2025 08:58
…og-post

# Conflicts:
#	docs/src/pages/blog/_meta.tsx
#	docs/src/pages/blog/index.mdx
#	docs/src/pages/blog/next-intl-4-0.mdx
@amannn amannn changed the title docs: Add blog post about rootParams docs: Add blog post about rootParams / next/root-params Aug 27, 2025
@amannn amannn changed the title docs: Add blog post about rootParams / next/root-params docs: Add blog post about next/root-params Aug 27, 2025
@jokull

jokull commented Jan 27, 2026

Copy link
Copy Markdown

Looks like the most recent next point release prevents import of root params (probably removed).

@amannn

amannn commented Jan 27, 2026

Copy link
Copy Markdown
Owner Author

@jokull Do you have some more information on this and an error message? Are you on latest stable or canary?

It seems like there was some activity regarding root params recently: vercel/next.js#88556. Would be quite surprising if it’s being removed.

I‘m currently not at my computer and can’t check in detail …

@jokull

jokull commented Jan 27, 2026

Copy link
Copy Markdown

@amannn Sorry for the confusion! I investigated and it turns out we were calling getLocale() inside a Route Handler, which internally uses rootParams.locale(). This is explicitly unsupported:

Route /[locale]/tours/[slug] used `import('next/root-params').locale()` inside a Route Handler. 
Support for this API in Route Handlers is planned for a future version of Next.js.

The error was only showing up in production (Sentry), not locally, which threw me off. We'll switch to using the locale from params directly in Route Handlers instead. Nothing changed in Next.js - this limitation has always been there.

@amannn

amannn commented Jan 29, 2026

Copy link
Copy Markdown
Owner Author

Ah yep, that one is known—thanks for following up!

…og-post

# Conflicts:
#	docs/src/pages/blog/_meta.tsx
#	docs/src/pages/blog/index.mdx
@sss-Mihail-sss

Copy link
Copy Markdown

is it time?)

@sss-Mihail-sss

Copy link
Copy Markdown

A small advancement of route-params feat: generate root params types

@amannn amannn changed the title docs: Add blog post about next/root-params fix: Deprecate setRequestLocale and add blog post on next/root-params May 15, 2026
@amannn amannn mentioned this pull request May 29, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Docs]: Remove pass-through layout Geting rid of setRequestLocale

4 participants