public/assets/js/custom_js/HaseLanguageDropDown.js
/**
  * Function is dispaly language in drop down.
  */
Function is dispaly language in drop down.
Function is dispaly language in drop down .
function userKnownLanguageDropDown(){
    var cookieName = userLanguageList.COOKIES_LANGUAGE_CODE;
    languageCode = readLanguageNameCookie(cookieName);
    if (!languageCode) {
        languageCode = userLanguageList.DEFAULT_LANGUAGE_CODE;
    }
	jQuery(userLanguageList.MULTI_LANGUAGE_DROPDOWN_ID)
			.kendoDropDownList(
					{
						dataTextField : userLanguageList.LANGUAGE_NAME_FIELD,
						dataValueField : userLanguageList.LANGUAGE_CODE_FIELD,
						optionLabel : userLanguageList.SELECT_LANGUAGE_LABEL,
						dataSource : {
							transport : {
								read : {
									dataType : userLanguageList.JSON_DATA_TYPE,
									url : userLanguageList.USER_KNOWN_LANGUAGE_LIST,
									type : userLanguageList.DATA_TYPE
								}
							}
						},
					        value: languageCode,
					        change: function () {
					            var languageValues = jQuery(userLanguageList.MULTI_LANGUAGE_DROPDOWN_ID).data(userLanguageList.KENDO_DROPDOWN_LIST_VALUE);
							    console.log(languageValues);
                                languageCode = this.value();
					            if (!languageCode) {
					                languageCode = userLanguageList.DEFAULT_LANGUAGE_CODE;
					            }
					            var cookieExpireDays = userLanguageList.COOKIE_EXPIRE_DAY;
					            setLanguageName(cookieName, languageCode, cookieExpireDays);
					            window.location.reload();
					        }
					});
}
function userKnownLanguageDropDown ( ) { var cookieName = userLanguageList . COOKIES_LANGUAGE_CODE ; languageCode = readLanguageNameCookie ( cookieName ) ; if ( ! languageCode ) { languageCode = userLanguageList . DEFAULT_LANGUAGE_CODE ; } jQuery ( userLanguageList . MULTI_LANGUAGE_DROPDOWN_ID ) . kendoDropDownList ( { dataTextField : userLanguageList . LANGUAGE_NAME_FIELD , dataValueField : userLanguageList . LANGUAGE_CODE_FIELD , optionLabel : userLanguageList . SELECT_LANGUAGE_LABEL , dataSource : { transport : { read : { dataType : userLanguageList . JSON_DATA_TYPE , url : userLanguageList . USER_KNOWN_LANGUAGE_LIST , type : userLanguageList . DATA_TYPE } } } , value : languageCode , change : function ( ) { var languageValues = jQuery ( userLanguageList . MULTI_LANGUAGE_DROPDOWN_ID ) . data ( userLanguageList . KENDO_DROPDOWN_LIST_VALUE ) ; console . log ( languageValues ) ; languageCode = this . value ( ) ; if ( ! languageCode ) { languageCode = userLanguageList . DEFAULT_LANGUAGE_CODE ; } var cookieExpireDays = userLanguageList . COOKIE_EXPIRE_DAY ; setLanguageName ( cookieName , languageCode , cookieExpireDays ) ; window . location . reload ( ) ; } } ) ; }
Function is dispaly language in drop down.
Function is dispaly language in drop down .