Oct 13, 2021 8:26 AM - edited Oct 13, 2021 8:27 AM
I am currently trying to create a multilingual Subscription Preferences Page.
We already have set up all the translations for email subscription types like shown here: https://knowledge.hubspot.com/contacts/create-translations-for-your-email-subscription-types
After we did that, we see a dropdown menu at the top of the email preferences page to select a translation language.
The page URL has a parameter "languagePreference" which contains the language code. This language, if available, is also selected directly in the DropDown.
Now I want to display further content based on this language. To do this, however, I need to be able to read out the parameter value.
request.query result: portalId=9311353&email=fischer%40nextage.ch
It would be super if someone could help me here!
Oct 14, 2021 1:32 PM
Oct 18, 2021 9:08 AM
the language is set in the crm right?
If so you could set it up like this. In this example I'll give the crm property the name "language".
currentLangPref = "?contact.language?";
|Did my post help answer your query? Help the Community by marking it as a solution|
Oct 18, 2021 9:35 AM
The language of each contact is set within the crm: contact.hs_language. This value I get easily.
But the languagePreference parameter is set by the language of the email.
Now, it is theoretically possible for a French speaker to receive an English newsletter. Not nice but possible.
The dropdown and thus the subscriptions are displayed in the language of the newsletter. But since I can't query this language, the rest of the page would be in French (contact.hs_language). Also, I don't see any way to change the default language of the dropdown without refreshing the page.
It would be easiest if I could display the entire content of the page in the language from the languagePreference parameter. But for that I have to be able to read this parameter first.
Oct 16, 2021 3:24 PM