ISO language is passed in Q_lang which isn't working for three languages. Script to change the iso language to Qualtrics language | XM Community
Skip to main content

Hi All,

   We are using Q_lang parameter for prepopulating the customer preference language in the url sent in the email. However, for the below languages Qualtrics is using a different language code values.

 

ISO Code → Qualtrics

ES    → ES-ES

ZH  → ZH-S

ZF → ZH-T

 

We are using blocks on the survey and would like to add the javascript to one of the block which can change the language on the load.

OnReady function.

 var Q_Lang= "${e://Field/Q_lang}";
    
    if(Q_Lang=="ZH") { jQuery("#Q_lang").val("ZH-S").trigger("change") };
    if(Q_Lang=="ZF") { jQuery("#Q_lang").val("ZH-T").trigger("change") };
    if(Q_Lang=="ES") { jQuery("#Q_lang").val("ES-ES").trigger("change") };

However, this isn’t working. Can you please give us the hint?

 

The code does work!
Not sure where you’re facing issue.


Leave a Reply