Hi @subin
First you need to pick a default language for your domain. Go to Content » Content Settings » Content Languages and pick a default language.
In your example, if English is default, go to the Spanish version of the page » Edit » Settings and click the Translation Settings link (in your second screenshot).
Pick the “Choose a master” option and set the language of the current page to Spanish in the first field and find the corresponding English page in the second field.
This will have a number of consequences, all of which you can read more about here »
You can then add the language switcher module to your page template (simply follow the guide in the above link). The switcher will only be displayed on pages that have a translated version.
That’s it!
Let me just share the issues I’ve stumbled upon in working with web page translations for my company website. And this might be slightly off topic, but I’ll share it anyway because I feel that the documentation wasn’t clear on the full effects of translating pages.
Setting the default language of your domain will set the language of all your current and new website and landing pages on that domain to the default language. In my case it was Swedish. Everything fine so far. However, when I made English and German translations of the website I realized HubSpot is doing something called “automatic link rewrites”.
I realized that because I had a menu in the top navigation where the user could change the language. Note that this was not the language switcher module described above, it was simply a list of links to the startpage in each of the different languages (Swedish, English, German).
The problem is that the automatic link rewrite changed the URL that my links were pointing to like this:
- If you were on a Swedish page, e.g. About us, and want to change to German, it would take you to the Swedish startpage.
- If you were on the German About us page and clicked the link for Swedish, it would take you to the German startpage.
Ok, so I tried making the startpage as separate pages rather than translations, and then the language links worked fine. However, now that they were not translations, they all had the default language: Swedish, and so HubSpot assumes you are only interested in Swedish content. So when you are on the startpage and want to click the About us link, it will be pointing to the Swedish version of that page, whether you’re on the Swedish, English, or German startpage. This meant that all links in our top menu would be pointing to a Swedish page. And there’s no way to turn the link rewrites off.