GSoC/GCI Archive
Google Code-in 2010 LimeSurvey

Add the ability to have & use a date separator by language

completed by: Kshitij

mentors: Carsten Schmitz, Machaven


Looking at decimal_point, the comma as decimal seperator is used in at least half of the world's countries. Right now LimeSurvey does only handle the dot as comma separator.

It should be possible to have a default decimal separator for all available languages in LimeSurvey.

Still a survey admin should be able to change it per language when configuring his survey.


Task goals

The implementation should be very similar to the way the different date formats are implementd in LimeSurvey.

  • Extend surveytranslator.php by the according default decimal separator for each language (research on the Wikipedia link above)
  • Extend the survey configuration so the default decimal separator can be changed for each language (similar to the date format). Only predefined decimal separators should be available. You might need a new field in the survey_languagesettings table for that
  • Extend all numeric questions types (should be two) to handle the decimal separator on input. Depending on the decimal separator only numbers and the set decimal separator should be allowed
  • Extend the 'multiple numeric questiont type' with an integer_only attribute (same as on the normal numeric question type)
  • Make sure all numeric question attributes are still working on both question types. Especially for the in page calculations you will need an inline JS conversion.
  • Make sure that if a decimal separator other than dot is used that the question still saves correctly and loads the response properly in the set format if the survey taker should return (go back) to the question page in an active and inactive survey

Task steps

  • Install the LImeSurvey 1.x development version.
  • Code like a crazy monkey ;)
  • If you are stumped, ask us.