Welcome, Guest
Username: Password: Remember me

TOPIC: Can you use the survey language as a condition.

Can you use the survey language as a condition. 8 months 1 week ago #101725

  • Hendrik
  • Hendrik's Avatar
  • OFFLINE
  • Fresh Lemon
  • Posts: 9
  • Karma: 0
Hello,

We are trying to create a survey in several languages with some questions appearing only in some languages.

The survey needs to be anonymous. We will send the url for the specific language to the respondents in the specific country. We do not want to use a visible language switcher.

Some questions are only valid for the German language, others only for English, most questions are for all languages.

Is there any way in Limesurvey to base a condition on the current language, like:
"only use this question when survey_language equals German"

Kind regards,
Hendrik Jan
Last Edit: 8 months 1 week ago by Hendrik. Reason: Spelling error
The administrator has disabled public write access.

Can you use the survey language as a condition. 8 months 1 week ago #101924

  • lgarzmann
  • lgarzmann's Avatar
  • OFFLINE
  • Fresh Lemon
  • Posts: 5
  • Karma: 0
Get familiar with setting conditions for your questions. I only have the German LimeSurvey installed so I'm not quite sure about the vocabulary.

You can set conditions for every question (the arrow that splits up into two heads).

Then you have to select the language code in the tokens menu. Must equal "de" for German and "en" for English.
The administrator has disabled public write access.

Can you use the survey language as a condition. 8 months 1 week ago #101926

  • tpartner
  • tpartner's Avatar
  • OFFLINE
  • LimeSurvey Team
  • Posts: 4072
  • Thank you received: 748
  • Karma: 341
You can use the {SURVEYLANGUAGE} variable in relevance equations.

So, the relevance equations would be:
SURVEYLANGUAGE == "en"
SURVEYLANGUAGE == "de"
Cheers,
Tony Partner

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

LimeSurvey is open-source and run entirely by volunteers so please consider donating to support the project.
The administrator has disabled public write access.

Can you use the survey language as a condition. 8 months 1 week ago #101929

  • Ben_V
  • Ben_V's Avatar
  • OFFLINE
  • Platinum Lime
  • Posts: 1061
  • Thank you received: 234
  • Karma: 74
Hello Tony,


Is {SURVEYLANGUAGE} an existing keyword or do you mean {LANG} ?
:unsure:
Benoît

goo.gl/Bw5iM => Recherche GG dans le forum français (remplacer "exemple" dans la barre de recherche)
goo.gl/WX8PH => GG search for english forum (Replace "example" in the search bar)
goo.gl/IxiGu => Búsqueda en el foro en español (Cambiar "ejemplo" en la barra de...
The administrator has disabled public write access.

Can you use the survey language as a condition. 8 months 1 week ago #101931

  • tpartner
  • tpartner's Avatar
  • OFFLINE
  • LimeSurvey Team
  • Posts: 4072
  • Thank you received: 748
  • Karma: 341
Hi Ben,

It is an existing keyword, most commonly used in startpage.pstpl to add a class to the <body> element.

Of course, when using it in a relevance equation, you omit the curly braces.
Cheers,
Tony Partner

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

LimeSurvey is open-source and run entirely by volunteers so please consider donating to support the project.
The administrator has disabled public write access.

Can you use the survey language as a condition. 8 months 1 week ago #101932

  • tpartner
  • tpartner's Avatar
  • OFFLINE
  • LimeSurvey Team
  • Posts: 4072
  • Thank you received: 748
  • Karma: 341
Having said that, a quick look at replacements_helper.php indicates that {LANG}, {SURVEYLANGAGE} and {SURVEYLANGUAGE} should all return the same thing.
Cheers,
Tony Partner

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

LimeSurvey is open-source and run entirely by volunteers so please consider donating to support the project.
The administrator has disabled public write access.
The following user(s) said Thank You: jonsen

Can you use the survey language as a condition. 8 months 1 week ago #101934

  • Ben_V
  • Ben_V's Avatar
  • OFFLINE
  • Platinum Lime
  • Posts: 1061
  • Thank you received: 234
  • Karma: 74
Thank you Tony...
It's more clear for me know and I'll have a look very soon at replacements_helper.php's content for more details...

Note: Consider that it's not an easy job to tell you that you may be wrong :cheer:
.
Benoît

goo.gl/Bw5iM => Recherche GG dans le forum français (remplacer "exemple" dans la barre de recherche)
goo.gl/WX8PH => GG search for english forum (Replace "example" in the search bar)
goo.gl/IxiGu => Búsqueda en el foro en español (Cambiar "ejemplo" en la barra de...
The administrator has disabled public write access.

Can you use the survey language as a condition. 8 months 1 week ago #101943

  • tpartner
  • tpartner's Avatar
  • OFFLINE
  • LimeSurvey Team
  • Posts: 4072
  • Thank you received: 748
  • Karma: 341
Consider that it's not an easy job to tell you that you may be wrong
Oh, I'm wrong often enough!

Besides, this time we are both right :)
Cheers,
Tony Partner

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

LimeSurvey is open-source and run entirely by volunteers so please consider donating to support the project.
Last Edit: 8 months 1 week ago by tpartner.
The administrator has disabled public write access.
Moderators: ITEd
Time to create page: 0.141 seconds
Donation Image