CMS Development

Bckr
Participant | Elite Partner
Participant | Elite Partner

multi language Cookie

Hello, I am building a multi language site now I have a languange switcher but it doesn't seem to save the cookie?I want it so the user sets the language and the next time they come back the language is in the latest language.

https://knowledge.hubspot.com/privacy-and-consent/what-cookies-does-hubspot-set-in-a-visitor-s-brows...

Code I use for my language switcher

 

 

{% language_switcher "language_switcher" class="fas fa-globe" overrideable=false, display_mode="localized", label="Language Switcher" %}

 

 

 
The only cookies I see are:

Bckr_0-1703236974224.png

 

 

0 Upvotes
3 Replies 3
SDebacker
Participant | Elite Partner
Participant | Elite Partner

multi language Cookie

We are encountering the same issue with a client's site. I've checked multiple hubspot websites we manage & tried different settings of allowing all cookies/only the necessary ones. Even tried setting the cookie myself using the dev-tools with the format documented here: https://knowledge.hubspot.com/privacy-and-consent/what-cookies-does-hubspot-set-in-a-visitor-s-brows... but nothing seems to work.

I'm not interested in having a redirect based on browser settings. The problem is, that we are noticing that the langauge-switcher is the most used button/component on the site! We have 2 version of dutch: one for Belgium, on for the Netherlands, and our client provides different services to these countries.
So the info in both locales is not the same. That an end-user end's up on the wrong language on first visit is not that big of an issue. But once a user has chosen their language of preference, this should be stored/remembered and acted on the next time they visit. How come this is not working? Is this a setting some where? And how can we fix this?

0 Upvotes
Bckr
Participant | Elite Partner
Participant | Elite Partner

multi language Cookie

Hi @kvlschaefer,

Thank you for the responds but the related thread you mention isn't about the cookies from the language switcher. In the documentation about cookies It says in the necessart cookies that do not require consent.
hs_langswitcher_choice but I am not able to find this in my cookies.


Kind regards,
Bent

0 Upvotes
kvlschaefer
Community Manager
Community Manager

multi language Cookie

Hi @Bckr,

 

I wanted to refer you to this related thread regarding setting a multi-language switcher's language based on a browser's setting.   
@alyssamwilie@JBeatty@Anton@MatthiasWeber@BarryGrennan - Do you have any code examples you could share with @Bckr? Do you have any insight you can share on cookies? 

 

Thank you! 

Best,

Kristen


Did you know that the Community is available in other languages?
Join regional conversations by changing your language settings !
0 Upvotes