CMS Development

Sascha
Contributor

How to deal with links in multi-language setups

Hi,

 

We recently translated our website to German and basically followed HubSpot's instructions for multi-language variations to the letter. 

 

I was a bit naive to think HubSpot would handle it all "automagically" by dropping `hreflang` tags into pages and letting the Browser deal with selecting the page it wants. 

 

Unfortunately, that doesn't really seem to work. My issue is with links in the content. We did not touch them, trusting that the Browser would pick the correct URL based on the hreflang tags. That's not happening though. 

 

Instead, we get these dynamically created URLs from HubSpot with the /?hsLang=xx URL parameter at the end. I think I understand how these work and how to control that behavior (Setting: Enable language specific redirects). 

 

Both SEMrush and Google Search Console immediately started complaining about these links for various reasons (missing canonical being one of them). 

 

What is the best approach here? Are we really expected to update all links in all of our content manually so they point to the destination in the selected language? 

 

e.g. if we have a link site.com/page, should we update the link to site.com/de/page manually?

 

I am mighty confused about this all and support hasn't been very helpful. 

 

Thanks!

0 Upvotes
4 Replies 4
Jnix284
Hall of Famer

How to deal with links in multi-language setups

Hi @Sascha 

 

Since you mentioned following instructions to the letter, I'm going to assume your pages are setup in a multi-language group.

 

When you say you have a link like site.com/page that is on the page, are you using an "external" URL type where you are manually typing this link or are you using the "content" link type where you are selecting the page from a dropdown?

 


If my reply answered your question please mark it as a solution to make it easier for others to find.


Jennifer Nixon
0 Upvotes
Sascha
Contributor

How to deal with links in multi-language setups

Hi Jennifer, we're using the content link type ("Link to one of your pages"). And yes, multi-language group.

 

The /?hsLang=xx URL parameter only goes away if we specifically link to the page in the designated target language. Which means we would have to manually update all links in all language variations. Which is not something I would expect from a CMS. 

 

However, we have since filtered out the URL parameter from our SEMrush reports, so they no longer appear as an issue there and apparently, Google Search seems to handle these pages without any issues, too. 

 

So at this point it's more of a "cosmetic" issue. Still, I am not happy that HubSpot does not automatically switch the language based on the language set in the browser. We had to put in a JavaScript to make that work. 

0 Upvotes
Jnix284
Hall of Famer

How to deal with links in multi-language setups

@Sascha How are you handling the translation for the rest of the content on the page? Since you have multi-variant pages, I assume you're already modifying the text-based content to translate from English to German manually, so wouldn't you do the same for the links?


If my reply answered your question please mark it as a solution to make it easier for others to find.


Jennifer Nixon
0 Upvotes
Jaycee_Lewis
Community Manager
Community Manager

How to deal with links in multi-language setups

Hi, @Sascha 👋 Thanks for reaching out! Hey, @LMeert @Bryantworks, do you have any tips or suggestions for @Sascha?

 

Thank you very much!  — Jaycee

linkedin

Jaycee Lewis

Developer Community Manager

Community | HubSpot

0 Upvotes