Piping non-English select choices to Salesforce | XM Community
Skip to main content
Solved

Piping non-English select choices to Salesforce

  • June 16, 2022
  • 10 replies
  • 54 views

Forum|alt.badge.img

Hi folks,
We have an international study that can be filled in in multiple languages. Instead of sending the answer choices of the select questions in English, the integration sends answers in whatever language the survey was filled in. This creates an issue on the SF end as it doesn't recognize the value.
Besides recoding all the variables is there a way to make sure that answers are sent in English?
Thanks in advance!

Best answer by TomG

https://community.qualtrics.com/XMcommunity/discussion/comment/47008#Comment_47008This should do it:
Qualtrics.SurveyEngine.addOnReady(function() {
if(jQuery("#Q_lang").val()=="EN") this.clickNextButton();
else jQuery("#Q_lang").val("EN").trigger("change");
});

10 replies

TomG
Level 8 ●●●●●●●●
Forum|alt.badge.img+27
  • Level 8 ●●●●●●●●
  • June 16, 2022

You could add a question to the end of the survey that uses JS to switch the language to English.


InessaG
Level 5 ●●●●●
Forum|alt.badge.img+19
  • Level 5 ●●●●●
  • June 16, 2022

I have the same issue. And I am not proficient in JS so can't use that option unless i'm spoonfed that solution.


TomG
Level 8 ●●●●●●●●
Forum|alt.badge.img+27
  • Level 8 ●●●●●●●●
  • Answer
  • June 16, 2022

https://community.qualtrics.com/XMcommunity/discussion/comment/47008#Comment_47008This should do it:
Qualtrics.SurveyEngine.addOnReady(function() {
if(jQuery("#Q_lang").val()=="EN") this.clickNextButton();
else jQuery("#Q_lang").val("EN").trigger("change");
});


InessaG
Level 5 ●●●●●
Forum|alt.badge.img+19
  • Level 5 ●●●●●
  • June 16, 2022

TomG Thanks! So does this change all values across all questions in the survey to English? Or is there a need to specify by question?


TomG
Level 8 ●●●●●●●●
Forum|alt.badge.img+27
  • Level 8 ●●●●●●●●
  • June 16, 2022

https://community.qualtrics.com/XMcommunity/discussion/comment/47015#Comment_47015I think it will change it across the board. I think any values sent to SF are in the current language at the end of the survey.


Forum|alt.badge.img
  • Author
  • June 20, 2022

Hi Tom,
Thanks for your reply! Where do you recommend to paste the js code?


TomG
Level 8 ●●●●●●●●
Forum|alt.badge.img+27
  • Level 8 ●●●●●●●●
  • June 20, 2022

https://community.qualtrics.com/XMcommunity/discussion/comment/47066#Comment_47066Attach it to a text/graphic question on its own page at the end of the survey.


Forum|alt.badge.img
  • Author
  • August 5, 2022

Screenshot 2022-08-05 at 14.22.25.pngHi Tom,
I pasted the code as you recommended; however, I get this loading signs and the page just doesn't load. Any recommendation on what to do?

UPDATE: You may ignore my comment. It all worked. I use British English, hence the code needs to be adjusted to "EN-GB". Thanks a lot for helping out!


Forum|alt.badge.img+21
  • QPN Level 5 ●●●●●
  • April 3, 2024

Hi @TomG any ideas on how can we send non-english open end comments into english language or a translated comment into Salesforce?


TomG
Level 8 ●●●●●●●●
Forum|alt.badge.img+27
  • Level 8 ●●●●●●●●
  • April 3, 2024

Hi @TomG any ideas on how can we send non-english open end comments into english language or a translated comment into Salesforce?

Use a translation API called from a web service.