Posts

Showing posts with the label JSOM

Change Language for current user with JSOM in SharePoint Online

Hi, Here is code which can change language for current user with JSOM : <script type="text/javascript" charset="utf8" src="/sites/BizDev/Style%20Library/SPS/jquery-1.11.3.min.js"></script> <select id='LangSelect' onchange="SetUserLanguage(this.value);"></select> <script type="text/javascript"> function SetUserLanguage(lCode) {     var call = $.ajax({             url: _spPageContextInfo.siteAbsoluteUrl + "/_api/Web/Lists/GetByTitle('Languages')/items?" + "$select=Title,Code,LCode,ID&$top=5000&$filter=Code eq "+lCode,             type: "GET",             dataType: "json",             headers: {                 Accept: "application/json;odata=verb...

Change Site Language with JSOM

Hi, Here is code which can change site language with JSOM : <script type="text/javascript" charset="utf8" src="/Style%20Library/SPS/jquery-1.11.3.min.js"></script> <select id='LangSelect' onchange="SetLanguage();"></select> <script type="text/javascript"> $( document ).ready(function() {     LoadLanguages();     setTimeout(GetUpdatedLangulage, 2000); }); function LoadLanguages() {         var call = $.ajax({             url: _spPageContextInfo.siteAbsoluteUrl + "/_api/Web/Lists/GetByTitle('Languages')/items?" + "$select=Title,Code,ID&$top=5000",             type: "GET",             dataType: "json",             headers: {         ...