Welcome to the LimeSurvey Community Forum

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

Change decimal seperator for equation question

  • EnricoPalazzo
  • EnricoPalazzo's Avatar Topic Author
  • Offline
  • New Member
  • New Member
More
7 years 1 month ago #150932 by EnricoPalazzo
Change decimal seperator for equation question was created by EnricoPalazzo
Hello,

I am struggleing with a problem related to country specific decimal seperators. I am building a survey for German participants. The survey includes a couple of lotteries, where depending on their answers, participants win money. I use equation questions to calculate how much money each participant wins and the result is displayed in a "Text display" question. Below is an english translation of the "text display" question:

The computerized random number generator has drawn Task 1 for payoff. Based on your decision in Task 1 the computerized random number generator has drawn a payoff of payout1B.shown ECU! For 1 ECU you receive 0.47$. Therefore an amount of payout1B.shown * 0.47$ results. For answering the questionnaire you will receive an additional 2.84$.



As you can see, the text display also involves some calculations (e.g. payout1B.shown*0.47), which refer to the results of previous hidden equation questions.


Now for the German version I would like to display "Comma" instead of a period. However, although I specified comma as a seperator in the survey settings, equation questions do not follow this rule.

Does anyone have an idea how to address this problem?

Thank you very much.

Kind regards

Felix
The topic has been locked.
More
7 years 1 month ago #150938 by jelo
string fixnum(number) -Display numbers with comma as radix separator, if needed

For the german display put fixnum(variable) around the variable.

The meaning of the word "stable" for users
www.limesurvey.org/forum/development/117...ord-stable-for-users
The following user(s) said Thank You: EnricoPalazzo
The topic has been locked.
  • EnricoPalazzo
  • EnricoPalazzo's Avatar Topic Author
  • Offline
  • New Member
  • New Member
More
7 years 1 month ago #150944 by EnricoPalazzo
Replied by EnricoPalazzo on topic Change decimal seperator for equation question
Dear jelo,

thank you very much for your help. Could you specify where I have to apply this code. Shall I apply it to the equation question or the text display question e.g. fixnum(payout1B.shown)
The topic has been locked.
  • EnricoPalazzo
  • EnricoPalazzo's Avatar Topic Author
  • Offline
  • New Member
  • New Member
More
7 years 1 month ago #150949 by EnricoPalazzo
Replied by EnricoPalazzo on topic Change decimal seperator for equation question
I figured it out. Thank you very much for answering my question so quick!
The topic has been locked.
  • holch
  • holch's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
7 years 1 month ago - 7 years 1 month ago #150952 by holch
And to be honest, most Germans probably will have no problem to understand it with a dot instead of a comma. No big deal.

I answer at the LimeSurvey forum in my spare time, I'm not a LimeSurvey GmbH employee.
No support via private message.

Last edit: 7 years 1 month ago by holch.
The topic has been locked.

Lime-years ahead

Online-surveys for every purse and purpose