Show updated translations without full page reload (Next.js) #2004
Replies: 2 comments 1 reply
-
I think what many people who use a CMS do is to invalidate relevant pages when the underlying data changes. If your pages use caching, you could consider invoking |
Beta Was this translation helpful? Give feedback.
-
Thanks @amannn ! Yes, we already revalidate pages, using tags instead of path for more fine-grained control. export default function Page() {
return <ClientPage />;
} Is it correct that when navigating by such pages, new translations will not be fetched (as there are no calls of |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
I store translations in CMS (Sanity) and load them in
request.ts
:What I want to achieve:
When I change translations in CMS, the updated messages are shown to the user on page navigation, without full page reload.
(I know that many our users do not reload the app for a long time).
I've noticed that currently
request.ts
is not executed during page navigations, so updated translations are not picked up.Is it possible?
Beta Was this translation helpful? Give feedback.
All reactions