Aug 30, 2018 11:35 AM
I have a language specific issue for a customer whose website is on HubSpot COS.
I need the home page without slug to redirect to either the /fr homepage or /en homepage, depending on the language setting in the user's cookie.
Right now, I only used a 301 redirect from no slug to /fr (main language), but I would really like the website to recognize the user's language for direct traffic coming from the homepage without slug.
Normally, we used to deal with that on the server side, but now that the site is on HubSpot, we don't have access anymore.
So is there a simple script I could put in the header of the no slug homepage to detect cookie language? Or should I do it differently?
Thanks guys !
Sep 12, 2018 12:10 PM
Accept-Language header. Currently, you can target smart content based on preferred language, but otherwise it's not accessible client-side. I've included a couple resources that might be helpful below:
Oct 16, 2019 8:22 AM
Do you know how to combine smart content with the language switcher? We've got a client who also wants to deliver EN content to all visitors outside The Netherlands. At least at their homepage. At the same time they want the visitor to be able to switch the language on other pages.
What happens when someone visits the homepage and based on browser language or country (by IP address) sees the EN version and navigates to another page. Does she still sees EN content or will it be Dutch (as we speak/read in The Netherlands)? I think that can be managed by using different menu's as smart content as well. But I'm guessing here...