Blog, Website & Page Publishing

rickbyrd
Participante

Problem with lang="en"

resolver

The footer of our website template has links to several of our top level pages.  When hovering over them there is now an additional ?hsLang=en to the end of the domain.  I know what this represents.  I have 2 concerns.  First, I do not know when this happened or how it happened.  Second, the link to our blog page shows ?hsLang=en in the domain url, where as, the other links are properly directed to only show the domain url like they are supposed.  

 

Capture.PNG

I do not know how to make these changes in the templates.  I have been instructed to not make changes to the templates.  I would like to present this to the person that can make the changes with a proper explanation.

 

Any help is appreciated.  Let me know if my explanattion does not make sense.

 

Rick

1 Solução aceita
jennysowyrda
Solução
Gerente da Comunidade
Gerente da Comunidade

Problem with lang="en"

resolver

Hi @rickbyrd,

 

The text at the end of the links is related to your "enable language specific redirects" setting which can be found under settings>domains and urls>language settings. 

 

To remove the ?hsLang=en you will have to turn off the "Enable Language Specific Redirects"

 

Thank you,
Jenny

Exibir solução no post original

14 Respostas 14
jennysowyrda
Solução
Gerente da Comunidade
Gerente da Comunidade

Problem with lang="en"

resolver

Hi @rickbyrd,

 

The text at the end of the links is related to your "enable language specific redirects" setting which can be found under settings>domains and urls>language settings. 

 

To remove the ?hsLang=en you will have to turn off the "Enable Language Specific Redirects"

 

Thank you,
Jenny

06723
Participante

Problem with lang="en"

resolver

@jennysowyrda What are the drawbacks of disabling the "Enable Language Redirects" 

samuellavoie
Participante

Problem with lang="en"

resolver

Hi Jenny,

 

Beside this, what are the impacts of turning this "enable language-specific redirects" feature OFF? For a multilingual website.

thanks!

0 Avaliação positiva
jennysowyrda
Gerente da Comunidade
Gerente da Comunidade

Problem with lang="en"

resolver

HI @samuellavoie,

 

Turning the feature off would remove the ability to have multiple versions of one page in different languages. The functionalities outlined here would be those impacted. 

JohnS63
Colaborador(a)

Problem with lang="en"

resolver

Hi @jennysowyrda, how does this work? Is it based on browser language settings or something else? 

 

Thanks!

0 Avaliação positiva
jennysowyrda
Gerente da Comunidade
Gerente da Comunidade

Problem with lang="en"

resolver

Hi @JohnS63,

 

For a full explanation of how the multi language content works, I wanted to share this resource.

 

Thank you,
Jenny

0 Avaliação positiva
SteveG
Participante

Problem with lang="en"

resolver

Hi @jennysowyrda 

I don't understand the purpose of ?hslang=en being added to our URLs.  We've been managing a multi-language site for several years now, and most of our pages are part of multi-language groups, as HS intended.  But if each page is set to include its own language code in URL (e.g. /fr/, /es/, etc.) then why the need for an hslang URL parameter? 

Up until recently, it was merely an annoyance and somewhat confusing that our links and URLs were changing to include ?hslang, but the links always worked as intended, and our own language picker would always switch to the proper language version of our site.

However, we recently created a new multi-language group of pages, and added links at the top of each page to the other languages.  And for the first time, it didn't work.  Even though the href attribute was "https://www.domain.com/fr/pagename", every time we clicked on it, it would add ?hslang=en and always go to the English page instead of the French page.  We couldn't figure it out, and in the end, at the suggestion of HS Support, we went into our Domain & URLs > Language Settings and unchecked "Enable Language Specific Redirects" which fixed the problem.  But are we now losing out on other benefits?

0 Avaliação positiva
JimB_Huble
Colaborador(a) | Parceiro Elite
Colaborador(a) | Parceiro Elite

Problem with lang="en"

resolver

Just stumbled on this thread. I suspect the reason you were being redirected to the /en/ page each time you tested this is because you were located in an English speaking country? If you had been in France, you should have seen the FR version. 

 

The purpose of the language redirects tool is to serve content for users based on the region they are in/language they use, if a variant is available. HubSpot is looking at their IP and enforcing which content they see. 

 

Pros: let's say you have service pages for en/fr/de. But you only have an /en/ blog. With the redirects tool switched on, an internal link from the blog to an /en/ service page will automatically take a user in France to their region's /fr/ variant.  Without this tool switched on, you may find a lot of traffic only seeing your primary language content because they have to manually use the language switcher to locate it, and not everyone does that. 

 

Con: You're anticipating the user's need based on their IP and enforcing their experience. The user in France may actually have wanted to view the /en/ content. With this feature switched on they would experience the same situation as your test, and this may be a poor user experience and lead to bounces.

 

Make sure your language switcher is easy to spot so users can manually correct if they end up on the wrong page.

0 Avaliação positiva
Joachim_Koch
Participante | Parceiro Platinum
Participante | Parceiro Platinum

Problem with lang="en"

resolver

This seems to be in conflict with this kb-article:


"HubSpot does not use geoIP or a browser's set language to determine which variation of a page should render. For example, if the user's browser is set to french, this does not mean that your pages will automatically display in french. However, if a visitor is looking at a page in french, then clicks on a link to another page that has a translated french version, the visitor will be routed to the translated page."

Joachim Koch
0 Avaliação positiva
JimB_Huble
Colaborador(a) | Parceiro Elite
Colaborador(a) | Parceiro Elite

Problem with lang="en"

resolver

Hmmm, according to that knowledge base article, the tool doesn't work in the way as had been explained to me when it first came out.  Thanks for sharing. Please disregard my explanation above. Apologies for any confusion caused. 

Joachim_Koch
Participante | Parceiro Platinum
Participante | Parceiro Platinum

Problem with lang="en"

resolver

The use case of isn't totally clear or easy to understand, at least initially.  It doesn't solve for geography or browser-specific settings.

It solves when a "same-language" (as the originating page) page is available at the destination, example cases:
 - a year ago, you've linked from a French blog post to your English home page (shouldn't do that as it is a poor UX). Now, you translate your home page into French but forget to relink the blog post, hslang directs the user from the blog post to the French home page.  (Likely) Good for the user, not great for SEO.
- You dynamically have pages translated and want to connect to the matching destination page, etc.

Not being a fan of dynamic redirects for SEO and load speed reasons, our recommendation would be to build up new language pages as you build up a new website, connect to same-language pages only.  That means you start slower but with a better user experience.

Joachim

Joachim Koch
0 Avaliação positiva
LPM
Top colaborador(a) | Parceiro Diamante
Top colaborador(a) | Parceiro Diamante

Problem with lang="en"

resolver

I know I'm VERY late to the party here, but you can just add this class:

hs-skip-lang-url-rewrite

 on a wrapper containing the links and it won't add the language param at the end of the urls.

EIbraimi
Membro

Problem with lang="en"

resolver

I was also having some issues with redirects that are being created by HubSpot for my pages with the slug ?hsLang=en and what I cannot understand is why this is happening at first because I don't have the language specific redirects enabled. Do you think adding this hs-skip-lang-url-rewrite on top of my html or body can help me ?

 

0 Avaliação positiva
WObloza
Participante

Problem with lang="en"

resolver

Hello, did you solve this issue mayby? We have similar problem with one subpage- main menu on this page works correctly, but submenu and other links add ?hsLang to URL 😕

 

0 Avaliação positiva