Posted by : Alon Havivi Wednesday, January 07, 2015

 
 <script src="/_layouts/15/sp.requestexecutor.js"></script>  
 <script src="//ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js"></script>  
 <script type="text/javascript">  
   function handler(restURI, s, f) {  
     var restUrl = _spPageContextInfo.webAbsoluteUrl + restURI;  
     var executor = new SP.RequestExecutor(_spPageContextInfo.webAbsoluteUrl);  
     executor.executeAsync(  
       {  
         url: restUrl,  
         method: "GET",  
         headers: { "Accept": "application/json; odata=verbose" },  
         success: s,  
         error: f  
       }  
     );      
   }  
   function success(data) {      
     var jsonObject = JSON.parse(data.body);      
     var results = jsonObject.d.UserProfileProperties.results;       
     for (i = 0; i < results.length; i++) {  
       if (results[i].Key.indexOf("SPS-MUILanguages") > -1) {           
         $('#MUILanguages').append(results[i].Value);  
         break;          
       }  
     }  
   }  
   function fail(data, errorCode, errorMessage) {  
     $('#MUILanguages').append(errorMessage);   
   }  
   $(function () {  
     handler("/_api/SP.UserProfiles.PeopleManager/GetMyProperties", success, fail);  
   });  
 </script>  
 <div id="MUILanguages"> </div>  

2 Responses so far.

  1. The given information was very excellent & Great tips, and awesome way to get exert tips from everyone,not only i like that post all peoples like that post,because of all given information was wonderful and it's very helpful for me.
    html5 training in chennai

  2. Thanks for sharing this information, it helped me a lot in finding valuable resources for my career
    Dotnet Training in Chennai

Popular Post

- Copyright © Alon Havivi's Blog -