Gopi sarangi Profile - Hoblist '; } else { html += ' ' + data.language[i].display + ' '; } } else { html += ' ' + data.language[i].display + ' '; } } } document.getElementById("preferedLanuage").innerHTML = html; $('#language-modal').modal({ show: true, backdrop: 'static', keyboard: false }); } } } }) } function saveLanguage() { let selectedValues = []; $("#preferedLanuage :selected").each(function() { selectedValues.push($(this).val().toString()); }); if (typeof(Storage) !== "undefined") { if (selectedValues.length > 0) { localStorage.setItem("preferedLanuage", JSON.parse(JSON.stringify(selectedValues))); } else { localStorage.removeItem('preferedLanuage'); } let storageLanuage = localStorage.getItem("preferedLanuage"); let token = localStorage.getItem("currentToken"); if (storageLanuage !== null && storageLanuage !== undefined) { preferedLanuage = []; preferedLanuage = storageLanuage.split(","); } else { preferedLanuage = []; } if (userDetails.status) { $.ajax({ type: "POST", url: "/userLanguages", data: { languages: preferedLanuage, token: token }, success: function(data) { } }) } } window.location.reload(); $('#language-modal').modal('toggle'); }Gopi sarangi@ gopisarangi
