Welcome, Guest
Username: Password: Remember me

TOPIC: Add and remove languages - problem with quota & Block some languages temporarily

Add and remove languages - problem with quota & Block some languages temporarily 2 years 7 months ago #70737

  • nadine
  • nadine's Avatar
  • OFFLINE
  • Fresh Lemon
  • Posts: 2
  • Karma: 0
Hey together,

I have some problems regarding the different languages used in my survey.
Overall 5 languages are used. English is the basic language. I formulated some quotas before adding new languages and now these quotas do not work for the added languages. Is there any possibility to add languages without having to redo all the quotas? This is important to me as not all languages are completed but I would like to start the survey with the two first ones.

Or is it possible to have all 5 languages included but to block 3 of them from the drop down menu at the beginning of the survey until they are totally completed and, thus, to make them public a little bit later?

I'm using the following version: Version 1.91+ Build 11379

Thank you so much for your help in advance.
The administrator has disabled public write access.

Re: Add and remove languages - problem with quota & Block some languages temporarily 2 years 7 months ago #70771

  • tpartner
  • tpartner's Avatar
  • OFFLINE
  • LimeSurvey Team
  • Posts: 4050
  • Thank you received: 740
  • Karma: 341
It is possible to remove languages from the dropdown(s). Are you referring to the language switcher under the progress bar or a language question type?
Cheers,
Tony Partner

Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.

LimeSurvey is open-source and run entirely by volunteers so please consider donating to support the project.
The administrator has disabled public write access.

Re: Add and remove languages - problem with quota & Block some languages temporarily 2 years 7 months ago #70916

  • nadine
  • nadine's Avatar
  • OFFLINE
  • Fresh Lemon
  • Posts: 2
  • Karma: 0
I'm referring to the language switcher under the progress bar.
How does it work?
Thank you
The administrator has disabled public write access.

Re: Add and remove languages - problem with quota & Block some languages temporarily 2 years 7 months ago #70937

  • tpartner
  • tpartner's Avatar
  • OFFLINE
  • LimeSurvey Team
  • Posts: 4050
  • Thank you received: 740
  • Karma: 341
To temporarily remove languages from the language switcher add something like the following to your template.js file. This example will remove Dutch, Finnish and French. Replace the language codes in line 6 as required.
$(document).ready(function(){
 
		// All language codes to be removed (comma separated)
		removeLanguages('nl','fi','fr');
 
		function removeLanguages() {
			// Loop through all arguments passed to the function and remove corresponding select options
			$(arguments).each(function(i){
				$('.language-changer option[value$="&lang='+this+'"]').remove();
			});
		}
	});

Here's a list of language codes:

sq --- Albanian
ar --- Arabic
eu --- Basque
be --- Belarusian
bs --- Bosnian
bg --- Bulgarian
ca --- Catalan
zh-Hans --- Chinese (Simplified)
zh-Hant-HK --- Chinese (Traditional; Hong Kong)
zh-Hant-TW --- Chinese (Traditional; Taiwan)
hr --- Croatian
cs --- Czech
da --- Danish
nl --- Dutch
nl-informal --- Dutch Informal
en --- English
et --- Estonian
fi --- Finnish
fr --- French
gl --- Galician
de --- German
de-informal --- German informal
el --- Greek
he --- Hebrew
hi --- Hindi
hu --- Hungarian
is --- Icelandic
id --- Indonesian
ie --- Irish
it --- Italian
it-formal --- Italian (formal)
ja --- Japanese
ko --- Korean
lv --- Latvian
lt --- Lithuanian
mk --- Macedonian
ms --- Malay
mt --- Maltese
nb --- Norwegian (Bokmal)
nn --- Norwegian (Nynorsk)
fa --- Persian
pl --- Polish
pt --- Portuguese
pt-BR --- Portuguese (Brazilian)
pa --- Punjabi
ro --- Romanian
ru --- Russian
sr --- Serbian
si --- Sinhala
sk --- Slovak
sl --- Slovenian
es --- Spanish
es-MX --- Spanish (Mexico)
sv --- Swedish
th --- Thai
tr --- Turkish
ur --- Urdu
vi --- Vietnamese
cy --- Welsh
Cheers,
Tony Partner

Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.

LimeSurvey is open-source and run entirely by volunteers so please consider donating to support the project.
Last Edit: 2 years 7 months ago by tpartner.
The administrator has disabled public write access.
Moderators: ITEd
Time to create page: 0.127 seconds
Donation Image