Closed amannn closed 2 days ago
The latest updates on your projects. Learn more about Vercel for Git βοΈ
Name | Status | Preview | Comments | Updated (UTC) |
---|---|---|---|---|
next-intl-docs | β Ready (Inspect) | Visit Preview | π¬ Add feedback | Nov 14, 2024 2:13pm |
next-intl-example-app-router | β Ready (Inspect) | Visit Preview | π¬ Add feedback | Nov 14, 2024 2:13pm |
next-intl-example-app-router-without-i18n-routing | β Ready (Inspect) | Visit Preview | π¬ Add feedback | Nov 14, 2024 2:13pm |
tldr; β Do you already have a
NextIntlClientProvider
in your root layout that wraps all components? If yes, you can skip this.Previously,
useParams().locale
was consulted when reading fromuseLocale()
on the client side, allowing to use this API even when noNextIntlClientProvider
is used.This behavior has now been removed because:
useParams().locale
doesn't apply if you're using an App Router setup without i18n routing.useParams()
might require additional work from the developer in the future to work with the upcomingdynamicIO
rendering mode like adding'use cache'
or a<Suspense />
boundary.Therefore, if you use any features from
next-intl
on the client side, you should now add aNextIntlClientProvider
in the root layout and wrap all relevant components:Note that also navigation APIs like
Link
rely onuseLocale
internally.