IDE/IDE/assets/js/langtranslator/pramukhime-common.js
// Callback function which gets called when user presses F9 key.

Callback function which gets called when user presses F9 key.
Callback function which gets called when user presses F9 key .
function languageChangeCallback(data) {
	if (data.language === 'english') {
		$("#showHelp, #showSettings").attr('disabled', 'disabled');
	} else {
		$("#showHelp").removeAttr('disabled');
		$("#showSettings").removeAttr('disabled');
		$("#pramukhimecharmap").attr('src', 'img/' + pramukhIME.getHelpImage());
		$("#pramukhimehelpdetailed").attr('src', 'help/' + pramukhIME.getHelp());
		updateSettingsUi();
		saveSettings();
	}
	$("#showHelp i").removeClass().addClass("pi-" + data.kb + '-' + data.language + '-help');
	$("#showSettings i").removeClass().addClass("pi-" + data.kb + '-' + data.language + '-settings');
	$("#toggleLang i").removeClass().addClass("pi-" + data.lastKb + '-' + data.lastLanguage);
	$("#drpLanguage").val(data.kb + ':' + data.language);
	var kblang = data.lastKb + ':' + data.lastLanguage, items, value;
	$('#drpLanguage > option').each(function() {
		if (this.value === kblang) {
			value = pramukhime_lang[data.lastKb][data.lastLanguage];
			this.text = value + ' (F9)'; 
		} else {
			items = this.value.split(':');
			this.text = pramukhime_lang[items[0]][items[1]];
		}
	});
}
function languageChangeCallback ( data ) { if ( data . language === 'english' ) { $ ( "#showHelp, #showSettings" ) . attr ( 'disabled' , 'disabled' ) ; } else { $ ( "#showHelp" ) . removeAttr ( 'disabled' ) ; $ ( "#showSettings" ) . removeAttr ( 'disabled' ) ; $ ( "#pramukhimecharmap" ) . attr ( 'src' , 'img/' + pramukhIME . getHelpImage ( ) ) ; $ ( "#pramukhimehelpdetailed" ) . attr ( 'src' , 'help/' + pramukhIME . getHelp ( ) ) ; updateSettingsUi ( ) ; saveSettings ( ) ; } $ ( "#showHelp i" ) . removeClass ( ) . addClass ( "pi-" + data . kb + '-' + data . language + '-help' ) ; $ ( "#showSettings i" ) . removeClass ( ) . addClass ( "pi-" + data . kb + '-' + data . language + '-settings' ) ; $ ( "#toggleLang i" ) . removeClass ( ) . addClass ( "pi-" + data . lastKb + '-' + data . lastLanguage ) ; $ ( "#drpLanguage" ) . val ( data . kb + ':' + data . language ) ; var kblang = data . lastKb + ':' + data . lastLanguage , items , value ; $ ( '#drpLanguage > option' ) . each ( function ( ) { if ( this . value === kblang ) { value = pramukhime_lang [ data . lastKb ] [ data . lastLanguage ] ; this . text = value + ' (F9)' ; } else { items = this . value . split ( ':' ) ; this . text = pramukhime_lang [ items [ 0 ] ] [ items [ 1 ] ] ; } } ) ; }
Callback function which gets called when user presses F9 key.
Callback function which gets called when user presses F9 key .
// Change the dropdown to new selected language.
 // selected language is english so disable the buttons
 // change help image
 // changed detailed help
 // Update UI
 // save settings
 // Set the dropdown list value
 // Update the shortcut key
