Repository navigation
[MKT-1165]feat/change language of drive-web when arrives from website - #2280
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Deploying with
|
| Status | Name | Latest Commit | Preview URL | Updated (UTC) |
|---|---|---|---|---|
| ✅ Deployment successful! View logs |
website | e53252e | Commit Preview URL Branch Preview URL |
Nov 12 2026, 11:55 AM |
jaaaaavier
left a comment
There was a problem hiding this comment.
Do we need to change something on Drive-web??
No, in drive-web is already accepting the lng parameter to change the language. |
jaaaaavier
left a comment
There was a problem hiding this comment.
How about we use a constant that defines the supported languages, and have getCurrentLang return the value only if it's in that constant? That way, we can protect ourselves against injection attacks, MITM attacks, and things like that.
You are right, added the SUPPORTED_LANGUAGE list and added check if parameter lng has the valid value. |
|


Added the parameter lng in the links to redirect to drive-web with the language of user, obtaining the locale from the cookie i18next set from the pageProps locale or the router path locale or changing in languageBox selector. Changed in checkout method and those links that redirect to the drive-web to include the locale set in the cookie.
PS: the cookie can't be set correctly in the preview with domain .internxt.com, we can added it via console of the browser by using command to insert the cookie without domain:
document.cookie = 'i18next=es; Path=/';
Or insert it mannually in the application tab of dev tool page.