Check out the LimeSurvey source code on GitHub!

Less language in Start page

More
4 years 9 months ago #79897 by whitetiger
I don't want show a list of languages from Albania to Vietnam.
In any case, If I've defined a default language and some alternative languages foe summaries, why have to see this list?
Thanks in advance

Please Log in to join the conversation.

More
4 years 9 months ago #79985 by tpartner
Where are you seeing the list?

Can you provide screenshots or a better explanation?

Cheers,
Tony Partner

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

Please Log in to join the conversation.

More
4 years 9 months ago #80101 by Mazi
You should be able to hide options by using CSS. Have a look at the adminstyle.css file and add CSS code to hide options you don't want to be listed.


Best regards/Beste Grüße,
Dr. Marcel Minke
(Limesurvey Head of Support)
Need Help? We offer professional Limesurvey support
Contact: marcel.minke(at)survey-consulting.com'"

Please Log in to join the conversation.

More
4 years 9 months ago #80182 by whitetiger

Mazi wrote: You should be able to hide options by using CSS. Have a look at the adminstyle.css file and add CSS code to hide options you don't want to be listed.


Perhaps I am not clear.
I don't wish change the "layout", but only the list of the countries.
It is a good thing if there is a some option to "publish" or "unpublish" the countries from the administrative panel, but I will be happy also I a can simply delete all countries, from Albania to Vietnam.
I don't think that people in Vietnam goes into my portal for some surveys in Italian ;)

Thanks.

Please Log in to join the conversation.

More
4 years 9 months ago #80184 by whitetiger

tpartner wrote: Where are you seeing the list?

Can you provide screenshots or a better explanation?


It is the combo button in the first page.
In attach there is the snapshoot.

Thanks.
Attachments:

Please Log in to join the conversation.

More
4 years 9 months ago #80189 by Mazi
I think I once saw a solution here at the forums, so please use the forum search.

If I remember, adding such a feature for Limesurvey 2 was also on the list but I can't say if this has already been implemented.


Best regards/Beste Grüße,
Dr. Marcel Minke
(Limesurvey Head of Support)
Need Help? We offer professional Limesurvey support
Contact: marcel.minke(at)survey-consulting.com'"

Please Log in to join the conversation.

More
4 years 9 months ago #80257 by whitetiger

Mazi wrote: I think I once saw a solution here at the forums, so please use the forum search.

If I remember, adding such a feature for Limesurvey 2 was also on the list but I can't say if this has already been implemented.


I've already done a search, but I read only one message with a suggest to change the code and I don't wish to work in this manner because then I've to remember to do it also with new releases.
But if this is the unique solutions... I will do it.

Thanks

Please Log in to join the conversation.

More
4 years 9 months ago - 4 years 9 months ago #80299 by tpartner
Yeah, tacman's solution requires modifying the core code.

I would be inclined to do it with JavaScript.

Add something like the following to the end of surveylist.pstpl. Replace 'en', 'fr','it' with the language code(s) you want to show. (this example will only show English, French and Italian)
<script type="text/javascript" charset="utf-8">
 
	$(document).ready(function(){
 
		// All language codes to be displayed (comma separated)
		showLanguages('en', 'fr','it');
 
		function showLanguages() {
 
			// Create a clone of the language selector
			var clone = $('select.languagechanger').clone();
			$('option', clone).remove();
 
			// Loop through all arguments passed to the function and move corresponding select options to the clone
			$(arguments).each(function(i, val){
 
				$(clone).append($('.languagechanger:eq(0) option[value$="lang='+val+'"]'));
			});
 
			// Hide the original lang selector and insert the clone
			$('select.languagechanger').hide().after(clone);
		}
	}); 
 
</script>

Cheers,
Tony Partner

Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
Last Edit: 4 years 9 months ago by tpartner.

Please Log in to join the conversation.

More
4 years 9 months ago #80303 by Mazi
Simple but very useful solution, Tony. Please add it to the workarounds.

Thanks!


Best regards/Beste Grüße,
Dr. Marcel Minke
(Limesurvey Head of Support)
Need Help? We offer professional Limesurvey support
Contact: marcel.minke(at)survey-consulting.com'"

Please Log in to join the conversation.

More
4 years 9 months ago #80329 by DenisChenu

Mazi wrote: If I remember, adding such a feature for Limesurvey 2 was also on the list but I can't say if this has already been implemented.

Already implemented, maybe some optimisation, but here.

Denis

Assistance on LimeSurvey forum and LimeSurvey core development are on my free time.
I'm not a LimeSurvey GmbH member, professional service on demand (or search sondages pro).

Please Log in to join the conversation.

More
4 years 9 months ago #80336 by whitetiger
Very thanks.

Please Log in to join the conversation.

Imprint                   Privacy policy         General Terms & Conditions         Revocation information and revocation form