CMS Development

Amit_95
Participant | Platinum Partner
Participant | Platinum Partner

Is it possible to remove `hs_lang` from the URL for translated pages?

Is it possible to remove `hs_lang` from the URL for translated pages?

 
My goal is to achieve the following URL:
 
Global Page: /en/pro-test
French Page:  /fr/pro-test
 
I have tried to achieve this with the following:
 
`{{ request.path|split('/', 2)|last }}`
 
Which spits out: 
 
`/fr/pro-test?hsLang=en` (For the french page)
 
When clicking the link it redirects me to the `en` page, which is the global page, which is what I don't want. I believe this is because of the hsLang appended to the end. How can I remove this?
 
I have seen the HubSpot forum which states this is because of the language setting enabled in Settings (Settings > Domains & URLs >  Language Setting > Enable Language specific redirects)
 
But I need this feature enabled so that all links have the region code appended to the URL when a language change has occurred, so that I don't have to manually update all the links on a page translation.
 
Any way around this?
0 Upvotes
1 Reply 1
jennysowyrda
Community Manager
Community Manager

Is it possible to remove `hs_lang` from the URL for translated pages?

Hi @Amit_95,

 

For a full explanation of how to manage multi-language content I waned to share this resource which includes directions for disabling the language specific redirects. Currently using that functionality is the only way to disable that feature within HubSpot's built in functionality.

 

Thank you,
Jenny

0 Upvotes