Welcome to the LimeSurvey Community Forum

Ask the community, share ideas, and connect with other LimeSurvey users!

Set the survey language from a question

  • davebostockgmail
  • davebostockgmail's Avatar Topic Author
  • Offline
  • Elite Member
  • Elite Member
More
2 years 4 months ago #231862 by davebostockgmail
Set the survey language from a question was created by davebostockgmail
Please help us help you and fill where relevant:
Your LimeSurvey version: 5.3.32+220817
Own server or LimeSurvey hosting: Own Server
Survey theme/template: Fruity (Modified)
==================
What I would like to know is this .. is it possible to set the LANG / SURVEYLANGUAGE variable based on the answer to a question?

I know it is possible to set the answer to a question based on these variables ... for example {Country=if(SURVEYLANGUAGE=='en',1,if(SURVEYLANGUAGE=='de',2,3))} in an equation question, but what I would like to do is reverse this to set the survey language based on the answer of a question.

Thanks in advance

Dave

Please Log in to join the conversation.

  • tpartner
  • tpartner's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
2 years 4 months ago #231871 by tpartner
Replied by tpartner on topic Set the survey language from a question
No, the survey language is not a question so you cannot programmatically set it with ExpressionScript.

I'm not sure why you would want to since it is an indication of what language the survey was seen in.

Cheers,
Tony Partner

Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.

Please Log in to join the conversation.

  • davebostockgmail
  • davebostockgmail's Avatar Topic Author
  • Offline
  • Elite Member
  • Elite Member
More
2 years 4 months ago #231872 by davebostockgmail
Replied by davebostockgmail on topic Set the survey language from a question
Thanks Tony

I wasn't sure if you could set the variable outside of the Lang= URL variable but you have confirmed this.

The reason I was asking is that the client wants a clean URL with only numerical variable values ... I don't know why and I didn't ask.

I will create a redirect PHP page to meet their needs

Thanks
Dave

Please Log in to join the conversation.

  • holch
  • holch's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
2 years 4 months ago #231885 by holch
Replied by holch on topic Set the survey language from a question

I don't know why and I didn't ask.


Yeah, sometimes that is better... ;-)

What you could do is have a short survey with just a question about the language and then use the END URL feature to automatically redirect them to the correct language version of the "real" survey.

Help us to help you!
  • Provide your LS version and where it is installed (own server, uni/employer, SaaS hosting, etc.).
  • Always provide a LSS file (not LSQ or LSG).
Note: I answer at this forum in my spare time, I'm not a LimeSurvey GmbH employee.

Please Log in to join the conversation.

Moderators: tpartnerholch

Lime-years ahead

Online-surveys for every purse and purpose