Multilingual survey: Difference between revisions
From LimeSurvey Manual
mNo edit summary |
mNo edit summary |
||
Line 1: | Line 1: | ||
{{Alert|text=Under construction}} | {{Alert|text=Under construction}} | ||
__TOC__ | |||
=How to hide the language switcher from the welcome page= | =How to hide the language switcher from the welcome page= | ||
Line 9: | Line 9: | ||
<center>[[File:]]</center> | <center>[[File:Language switcher show languages.png]]</center> | ||
Line 16: | Line 16: | ||
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 [[ | To do that, access [[Themes]] from the global [[[[Administering LimeSurvey|Configuration menu]]. | ||
<center>[[File:]]</center> | <center>[[File:Language switcher themes.png]]</center> | ||
Line 25: | Line 25: | ||
<center>[[File:]]</center> | <center>[[File:Language switcher theme editor.png]]</center> | ||
{{Note| LimeSurvey does not allow | {{Note|LimeSurvey does not allow you 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.}} | ||
Line 34: | Line 34: | ||
<center>[[File:]]</center> | <center>[[File:Location language switcher twig.png]]</center> | ||
Line 43: | Line 43: | ||
</syntaxhighlight> | </syntaxhighlight> | ||
Comment it out and copy the following line below it: | Comment it out (replace "%" with "#") and copy the following line below it: | ||
<syntaxhighlight lang="php" enclose="div"> | <syntaxhighlight lang="php" enclose="div"> | ||
Line 53: | Line 53: | ||
<center>[[File:]]</center> | <center>[[File:Language switcher code replacement.png]]</center> | ||
Line 59: | Line 59: | ||
Now, the welcome page should look like this: | Access your survey and select the edited theme from the [[General settings|general settings]] panel. Now, the welcome page should look like this: | ||
<center>[[File:]]</center> | <center>[[File:Hide language switcher twig.png]]</center> |
Revision as of 15:46, 22 November 2018
How to hide the language switcher from the welcome page
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:

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.

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


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

Go to the line that contains the following function:
{% if aSurveyInfo.alanguageChanger.show == true %}
Comment it out (replace "%" with "#") and copy the following line below it:
{% if false == true %}
The line should look like this in the end:

Click on Copy to local theme and save changes to save your changes.
Access your survey and select the edited theme from the general settings panel. Now, the welcome page should look like this:
