Add the ability to have & use a date separator by language
completed by: Kshitij
mentors: Carsten Schmitz, Machaven
Looking at http://en.wikipedia.org/wiki/Decimal_mark#Countries_using_Arabic_numerals_with_ 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.
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
- Install the LImeSurvey 1.x development version.
- Code like a crazy monkey ;)
- If you are stumped, ask us.