Actions

Multilingual survey: Difference between revisions

From LimeSurvey Manual

mNo edit summary
mNo edit summary
Line 6: Line 6:




In the case in which you decide to launch a multilingual survey, you will observe on the welcome page a drop-down menu that permits your respondents to select the language in which they wish to fill in your survey.
In the case in which you decide to launch a multilingual survey, you will observe on the welcome page a drop-down menu that permits your respondents to select the language in which they wish to fill in your survey:
 
 
<center>[[File:]]</center>


However, in certain scenarios you wish to hide the respective option. There are many ways in which you can hide the language switcher.
However, in certain scenarios you wish to hide the respective option. There are many ways in which you can hide the language switcher.


One method that we recommend is to edit the corresponding .twig file. Comment <nowiki>{% if aSurveyInfo.alanguageChanger.show == true %}</nowiki> and add <nowiki>{% if %false == true %}</nowiki>
One method that we recommend is to edit the corresponding .twig file. Comment <nowiki>{% if aSurveyInfo.alanguageChanger.show == true %}</nowiki> and add <nowiki>{% if false == true %}</nowiki>


To do that, access the Themes section
To do that, access [[Administering LimeSurvey|Themes]] from the global Configuration menu.




Line 18: Line 22:




<syntaxhighlight lang="php" enclose="div">upload_tmp_dir="/temp"
Click on the ''Theme editor'' button to edit the desired theme:


session.save_path="/temp"</syntaxhighlight>


<center>[[File:]]</center>


Click on the ''Theme editor'' button to edit the desired theme:


 
{{Note| LimeSurvey does not allow its users to edit the standard themes! If you wish to add changes to a standard team, click on the ''Extend'' button located on the top bar to create a copy of the standard theme.}}
<center>[[File:]]</center>




Line 35: Line 37:




Edit the line that contains the following function:  
Go to the line that contains the following function:  


<syntaxhighlight lang="php" enclose="div">
{# if aSurveyInfo.alanguageChanger.show == true #}
</syntaxhighlight>


<syntaxhighlight lang="php" enclose="div">upload_tmp_dir="/temp"
Comment it out and copy the following line below:


session.save_path="/temp"</syntaxhighlight>
<syntaxhighlight lang="php" enclose="div">
{% if false == true %}
</syntaxhighlight>




Line 47: Line 54:


<center>[[File:]]</center>
<center>[[File:]]</center>
Click on ''Copy to local theme and save changes'' to save your changes.





Revision as of 15:31, 22 November 2018

  Under construction



How to hide the language switcher

In the case in which you decide to launch a multilingual survey, you will observe on the welcome page a drop-down menu that permits your respondents to select the language in which they wish to fill in your survey:


[[File:]]


However, in certain scenarios you wish to hide the respective option. There are many ways in which you can hide the language switcher.

One method that we recommend is to edit the corresponding .twig file. Comment {% if aSurveyInfo.alanguageChanger.show == true %} and add {% if false == true %}

To do that, access Themes from the global Configuration menu.


[[File:]]


Click on the Theme editor button to edit the desired theme:


[[File:]]


LimeSurvey does not allow its users to edit the standard themes! If you wish to add changes to a standard team, click on the Extend button located on the top bar to create a copy of the standard theme.


Look on the left side of the screen for the language_changer.twig file.


[[File:]]


Go to the line that contains the following function:

{# if aSurveyInfo.alanguageChanger.show == true #}

Comment it out and copy the following line below:

{% if false == true %}


The line should look like this in the end:


[[File:]]


Click on Copy to local theme and save changes to save your changes.


Now, the welcome page should look like this:


[[File:]]