Multilingual landing page

Nerea_Eguia1
Level 3

Multilingual landing page

Hello community! 

We are planing on building a template for a landing page. In that template we want to add a language selector as the landing page might be in two different laguages. 

Whenever we create that template, do we need to clone the landing page and create it in both languages? How do we associate them afterwards?

I believe that there has to be a lot of coding involved as well in order to create a button in which you can select another language. 

Do we need to take into account anything else? I've read in the community something about the CNAME. 

Thank you very much! 

Best regards!

4 REPLIES 4
Amit_Jain
Level 8 - Community Advisor

Re: Multilingual landing page

I would suggest following:

  • two <div> containers with specific IDs for each language content. Meaning the whole content will appear twice in different languages.
  • A button/drop down to select the language
  • A small JavaScript code to manage the visibility of these two <DIVs> based on the language selection.
Nerea_Eguia1
Level 3

Re: Multilingual landing page

Thank you Amit!

SanfordWhiteman
Level 10 - Community Moderator

Re: Multilingual landing page

Whenever we create that template, do we need to clone the landing page and create it in both languages?

Not necessarily. You should try to do it using a segmentation called "lang" (with segments for each language, "en-us", "es-us", etc.) as it's a lot easier to manage.

Once you have your content segmented, you can pass the language in the URL querystring, like /page.html?lang=en-us.  This is known as runtime segmentation. It does not require the lead to belong to a particular segment ahead of time. You can think of it as the page content being segmented, not the lead database being segmented.

I believe that there has to be a lot of coding involved as well in order to create a button in which you can select another language.

I certainly wouldn't call it "a lot", actually there's no code at all (in the sense of JavaScript code) if you just want a button that reloads the page with a different query string.

<form>
<button name="lang" value="en-us">English (US)</button>
<button name="lang" value="es-us">Spanish (US)</button>
</form>

Obviously additional functionality requires a Marketo-savvy developer.

Do we need to take into account anything else? I've read in the community something about the CNAME.

The Landing Page domain does not need to change for different languages unless you want it to. Some people have Domain Aliases like en-us.example.com and en-gb.example.com. Those domain aliases can't be used directly to segment content, though. You'd still need to pass the segment in the query string, en-us.example.com/?lang=en-us.

(Also, the DNS term "CNAME" is misused 99% of the time, unfortunately including the Marketo docs. The correct term is "alias".)

Nerea_Eguia1
Level 3

Re: Multilingual landing page

Thank you so much Sanford!