Welcome, Guest
Username: Password: Remember me

TOPIC: Limit the Language Options

Limit the Language Options 2 years 11 months ago #68269

  • mavituna
  • mavituna's Avatar
  • OFFLINE
  • Fresh Lemon
  • Posts: 2
  • Karma: 0
Hi;

Is there a way to limit the available languages two languages?
In the pull down menu there is plenty of language choices, but I want only the Turkish and English to be visible.
The administrator has disabled public write access.

Re: Limit the Language Options 2 years 11 months ago #68276

  • nico_8it
  • nico_8it's Avatar
  • OFFLINE
  • Junior Lime
  • Posts: 24
  • Thank you received: 1
  • Karma: 1
You can delete the sholders of the languages in the files of installation
The administrator has disabled public write access.

Re: Limit the Language Options 2 years 11 months ago #68277

  • Mazi
  • Mazi's Avatar
  • OFFLINE
  • LimeSurvey Team
  • Posts: 5351
  • Thank you received: 299
  • Karma: 250
I think this list is hardcoded at the source code somewhere, so without editing a source file this isn't possible.

Maybe some CSS would do the trick?

Best regards/Beste Grüße,
Dr. Marcel Minke
(Limesurvey Head of Support)
Need Help? We offer professional Limesurvey support
Contact: marcel.minke(at)limesurvey.org'"
The administrator has disabled public write access.

Re: Limit the Language Options 2 years 11 months ago #68283

  • DenisChenu
  • DenisChenu's Avatar
  • OFFLINE
  • Moderator Lime
  • Posts: 6472
  • Thank you received: 854
  • Karma: 254
Mazi wrote:
Maybe some CSS would do the trick?
I think of js ( jquery )

Some
$("#languagechanger option[value='/index.php?lang=sq']").remove();
:ohmy: There a lot of langage to do ;).

But maybe the best is : Feature request .
Last Edit: 2 years 11 months ago by DenisChenu. Reason: Feature request link
The administrator has disabled public write access.

Re: Limit the Language Options 2 years 11 months ago #68284

  • c_schmitz
  • c_schmitz's Avatar
  • OFFLINE
  • LimeSurvey Team
  • Posts: 810
  • Thank you received: 115
  • Karma: 93
Version 2.0 has this feature. Don't you guys read the change log? :P
Support us, too. Donate to the LimeSurvey project and help keep us going!
Last Edit: 2 years 11 months ago by c_schmitz.
The administrator has disabled public write access.

Re: Limit the Language Options 2 years 11 months ago #68285

  • mavituna
  • mavituna's Avatar
  • OFFLINE
  • Fresh Lemon
  • Posts: 2
  • Karma: 0
We are using 1.9*

As I investigated, it requires recode somewhere.
but where?
this is my question.
The administrator has disabled public write access.

Re: Limit the Language Options 2 years 11 months ago #68296

  • tpartner
  • tpartner's Avatar
  • OFFLINE
  • LimeSurvey Team
  • Posts: 4297
  • Thank you received: 810
  • Karma: 373
There a lot of langage to do
Yeah, it may be easier to:
- clone the options you want to keep
- remove all options
- insert the cloned options

To only show English and Turkish, add the following to the end of admin/scripts/admin_core.js:
$(document).ready(function(){
 
	// Create survey 
	if($('#language').length > 0) {
		var optEn = $('#language option[value="en"]').clone();
		var optTr = $('#language option[value="tr"]').clone();
		$('#language option').remove();
		$(optEn).appendTo('#language');
		$(optTr).appendTo('#language');
	}
 
	// Edit survey
	if($('#available_languages').length > 0) {
		var optEn = $('#available_languages option[value="en"]').clone();
		var optTr = $('#available_languages option[value="tr"]').clone();
		$('#available_languages option').remove();
		$(optEn).appendTo('#available_languages');
		$(optTr).appendTo('#available_languages');
	}
});
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: Limit the Language Options 2 years 11 months ago #68308

  • Mazi
  • Mazi's Avatar
  • OFFLINE
  • LimeSurvey Team
  • Posts: 5351
  • Thank you received: 299
  • Karma: 250
c_schmitz wrote:
Version 2.0 has this feature. Don't you guys read the change log? :P
Where can I read more about this new feature at the docs :P ?

Best regards/Beste Grüße,
Dr. Marcel Minke
(Limesurvey Head of Support)
Need Help? We offer professional Limesurvey support
Contact: marcel.minke(at)limesurvey.org'"
The administrator has disabled public write access.

Re: Limit the Language Options 2 years 10 months ago #70901

  • dynosure
  • dynosure's Avatar
  • OFFLINE
  • Fresh Lemon
  • Posts: 4
  • Thank you received: 2
  • Karma: 1
Hi,

I just did it by deleting the hard code in {limesurvey_folder}/classes/core/surveytranlator.php

For more detailed steps, you can check out my first review of LimeSurvey

I also fixed the bug that it will always show English as the first language at dropdown when you choose another language. And there is a duplicated English option down there which is really annoying for me.

Best,
Dezhi
Last Edit: 2 years 10 months ago by dynosure.
The administrator has disabled public write access.
The following user(s) said Thank You: SoFi
Moderators: ITEd
Time to create page: 0.137 seconds
Donation Image