Multi-Language Subscription Preferences Page

Participant | Platinum Partner

Hi there,


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:


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.


The Hubl variable request.query does not return the given url, so no languagePreference parameter available. If I do that with javascript I get the right URL containing the parameter languagePreference. But since I can't use Javasript variables in Hubl, I need to find the right Hubl variable to retriev the languagePreference value.




request.query result: portalId=9311353&


In the page source code I see a javascript function replaceLangPrefWith handels the language dropdown. I need to know which Hubl variable is used to set the default language: var currentLangPref = "? HUBL VARIABLE ?";


It would be super if someone could help me here!

4 Replies 4
Community Manager

@Anton , @Teun 

Have either of you worked with this issue before?



Check out our Community Developer Blog
where we feature our Community driven developer podcast and how to content
Key Advisor | Diamond Partner

Hi @MFischer

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

Participant | Platinum Partner

Hi @Anton 


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.


Thanks anyway,

Guide | Diamond Partner

I have not sadly! I do know that system pages do not return all the page variables that normal pages have available. Same goes for request.query..

Did my answer solve your issue? Help the community by marking it as the solution.