Statistics default language

4 years 11 months ago - 4 years 11 months ago #92343 by Qat
Qat created the topic: Statistics default language
Hi everybody !

I don't know if the following is a bug, or something I missed, or just a problem with my installation, so would you mind having an eye on it ?

- My installation of Limesurvey has French as default language.
- My survey has French as base language, but is also available in 12 other languages.

When I go to the statistics screen, I can select in which language the stats will be displayed (i.e. French), but there is no preselection so I get the first language in the list by default (Shqipe, that is Albanian).

So I wanted to modify this behaviour and set French as the default value for this <select> element. I looked into the \application\views\admin\export\statistics_view.php file, but there I saw this (from line 54) :
  foreach ($survlangs as $survlang)
     $language_options .= "\t<option value=\"{$survlang}\"";
     if ($sStatisticsLanguage == $survlang)
       $language_options .= " selected=\"selected\" " ;
     $temp = getLanguageNameFromCode($survlang,true);
     $language_options .= ">".$temp[1]."</option>\n";
  <label for='statlang'><?php $clang->eT("statistics report language"); ?></label>
  <select name="statlang" id="statlang"><?php echo $language_options; ?></select>

This got me confused, because if I read well, there is already a default value, and it depends on the $sStatisticsLanguage variable.

How can I set this variable ??
Last Edit: 4 years 11 months ago by Qat.

Please Log in to join the conversation.

Start now!

Just create your account and start using Limesurvey today.

Register now
Join our Newsletter!