Add a condition for writing NEXT_LOCALE to cookies #1213
kliatskiidenis
started this conversation in
General
Replies: 1 comment 1 reply
-
Hello community. I need help with a similar task. I will be glad for your advice. Thank you in advance. |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Good afternoon, can you help me with a question? Next js project with app routing, translated by the Next -intl library, a task has appeared, you need to add a condition before writing NEXT_LOCALE to cookies, namely you need to add a check for document.referrer and another custom cookie.
The reason is that NEXT_LOCALE needs to be written into cookies according to conditions, for example: if the link is from Google (document.referrer === 'https://www.google.com/') then there is no need to write or rewrite NEXT_LOCALE
Please tell me where this can be done? Maybe there is an example solution or a link in the doc on how to do this, but I couldn’t find it
Beta Was this translation helpful? Give feedback.
All reactions