{"id":663,"date":"2017-01-31T16:45:53","date_gmt":"2017-01-31T16:45:53","guid":{"rendered":"http:\/\/blog.softreeconsulting.com\/?p=663"},"modified":"2017-01-31T16:45:53","modified_gmt":"2017-01-31T16:45:53","slug":"user-regional-setting-using-sharepoint-jscom","status":"publish","type":"post","link":"https:\/\/softreetechnology.com\/blog\/office-365\/user-regional-setting-using-sharepoint-jscom\/","title":{"rendered":"Modify User Regional Setting using SharePoint JSCOM"},"content":{"rendered":"<p>This article will help you to change the user regional setting based on supported ui languages presents on\u00a0SharePoint online site.<\/p>\n<p>[code lang=&#8221;c&#8221;]<br \/>\n&lt;a href=&#8221;http:\/\/blog.softreeconsulting.com\/wp-content\/uploads\/2017\/01\/userregionsetting.png&#8221;&gt;&lt;img class=&#8221;aligncenter size-full wp-image-669&#8243; src=&#8221;https:\/\/blog.softreeconsulting.com\/wp-content\/uploads\/2017\/01\/userregionsetting.png&#8221; alt=&#8221;userregionsetting&#8221; width=&#8221;1018&#8243; height=&#8221;348&#8243; \/&gt;&lt;\/a&gt;<br \/>\nSP.SOD.executeFunc(&#8220;sp.js&#8221;, &#8220;SP.ClientContext&#8221;, function () {<br \/>\nSP.SOD.registerSod(&#8220;sp.userprofiles.js&#8221;, SP.Utilities.Utility.getLayoutsPageUrl(&#8220;sp.userprofiles.js&#8221;));<br \/>\nSP.SOD.executeFunc(&#8220;sp.userprofiles.js&#8221;, &#8220;SP.UserProfiles.PeopleManager&#8221;, ManageUserRegionSetting);<br \/>\n});<\/p>\n<p>function ManageUserRegionSetting() {<br \/>\nvar oContext = SP.ClientContext.get_current();<br \/>\nvar web = oContext.get_web();<br \/>\nvar peopleManager = new SP.UserProfiles.PeopleManager(oContext);<br \/>\nuserProfileProperties = peopleManager.getMyProperties();<\/p>\n<p>oContext.load(userProfileProperties);<br \/>\noContext.executeQueryAsync(function () {<\/p>\n<p>try {<br \/>\nvar currentUserAccountName = userProfileProperties.get_accountName();<\/p>\n<p>var currentUserLcid = userProfileProperties.get_userProfileProperties()[&#8216;SPS-Locale&#8217;];<\/p>\n<p>var newLcid = &#8220;1036&#8221;; \/\/Enter the lcid you want to set<\/p>\n<p>if (currentUserLcid != newLcid) {<\/p>\n<p>peopleManager.setSingleValueProfileProperty(currentUserAccountName, &#8220;SPS-Locale&#8221;, currentLcid);<\/p>\n<p>oContext.executeQueryAsync(function () {<br \/>\nconsole.log(&#8220;Succesfully modified user region setting.&#8221;);<br \/>\n},<br \/>\nfunction (sender, args) {<br \/>\n\/\/On Error<br \/>\nconsole.log(args.get_message());<br \/>\n});<br \/>\n}<br \/>\n} catch (e) {<br \/>\n\/\/On Error<br \/>\nconsole.log(e.message);<br \/>\n}<br \/>\n}, function (sender, args) {<br \/>\n\/\/On Error<br \/>\nconsole.log(args.get_message());<br \/>\n});<br \/>\n}<\/p>\n<p>[\/code]<\/p>\n<h4>This solution is brought to you by our SharePoint professionals&#8230;<\/h4>\n<p><a href=\"http:\/\/softreeconsulting.com\">Softree Consulting<\/a> employs SharePoint consultants, We are a technology services provider with the aim to help companies achieve exceptional performance through SharePoint. Our dedicated team of SharePoint consultants have the right bent of mind to understand and execute customer requirements. Be it web part development, migrating from SharePoint 2010 to SharePoint 2013, Office 365 or something else in SharePoint, we strive to deliver the best<\/p>\n<p>With more than 10 years of industry experience, these professionals have the best resources to deliver optimum results. They have been satisfying customers with some of the best SharePoint Strategies.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>This article will help you to change the user regional setting based on supported ui languages presents on\u00a0SharePoint online site. [code lang=&#8221;c&#8221;] &lt;a href=&#8221;http:\/\/blog.softreeconsulting.com\/wp-content\/uploads\/2017\/01\/userregionsetting.png&#8221;&gt;&lt;img class=&#8221;aligncenter size-full wp-image-669&#8243; src=&#8221;https:\/\/blog.softreeconsulting.com\/wp-content\/uploads\/2017\/01\/userregionsetting.png&#8221; alt=&#8221;userregionsetting&#8221; width=&#8221;1018&#8243; height=&#8221;348&#8243; \/&gt;&lt;\/a&gt; SP.SOD.executeFunc(&#8220;sp.js&#8221;, &#8220;SP.ClientContext&#8221;, function () { SP.SOD.registerSod(&#8220;sp.userprofiles.js&#8221;, SP.Utilities.Utility.getLayoutsPageUrl(&#8220;sp.userprofiles.js&#8221;)); SP.SOD.executeFunc(&#8220;sp.userprofiles.js&#8221;, &#8220;SP.UserProfiles.PeopleManager&#8221;, ManageUserRegionSetting); }); function ManageUserRegionSetting() { var oContext = SP.ClientContext.get_current(); var web = oContext.get_web(); var peopleManager = new SP.UserProfiles.PeopleManager(oContext); userProfileProperties [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[127],"tags":[],"class_list":["post-663","post","type-post","status-publish","format-standard","hentry","category-office-365"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v24.6 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>Modify User Regional Setting using SharePoint JSCOM - Softree Technology<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/softreetechnology.com\/blog\/office-365\/user-regional-setting-using-sharepoint-jscom\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Modify User Regional Setting using SharePoint JSCOM - Softree Technology\" \/>\n<meta property=\"og:description\" content=\"This article will help you to change the user regional setting based on supported ui languages presents on\u00a0SharePoint online site. [code lang=&#8221;c&#8221;] &lt;a href=&#8221;http:\/\/blog.softreeconsulting.com\/wp-content\/uploads\/2017\/01\/userregionsetting.png&#8221;&gt;&lt;img class=&#8221;aligncenter size-full wp-image-669&#8243; src=&#8221;https:\/\/blog.softreeconsulting.com\/wp-content\/uploads\/2017\/01\/userregionsetting.png&#8221; alt=&#8221;userregionsetting&#8221; width=&#8221;1018&#8243; height=&#8221;348&#8243; \/&gt;&lt;\/a&gt; SP.SOD.executeFunc(&#8220;sp.js&#8221;, &#8220;SP.ClientContext&#8221;, function () { SP.SOD.registerSod(&#8220;sp.userprofiles.js&#8221;, SP.Utilities.Utility.getLayoutsPageUrl(&#8220;sp.userprofiles.js&#8221;)); SP.SOD.executeFunc(&#8220;sp.userprofiles.js&#8221;, &#8220;SP.UserProfiles.PeopleManager&#8221;, ManageUserRegionSetting); }); function ManageUserRegionSetting() { var oContext = SP.ClientContext.get_current(); var web = oContext.get_web(); var peopleManager = new SP.UserProfiles.PeopleManager(oContext); userProfileProperties [&hellip;]\" \/>\n<meta property=\"og:url\" content=\"https:\/\/softreetechnology.com\/blog\/office-365\/user-regional-setting-using-sharepoint-jscom\/\" \/>\n<meta property=\"og:site_name\" content=\"Softree Technology\" \/>\n<meta property=\"article:published_time\" content=\"2017-01-31T16:45:53+00:00\" \/>\n<meta name=\"author\" content=\"admin\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"admin\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"1 minute\" \/>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Modify User Regional Setting using SharePoint JSCOM - Softree Technology","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/softreetechnology.com\/blog\/office-365\/user-regional-setting-using-sharepoint-jscom\/","og_locale":"en_US","og_type":"article","og_title":"Modify User Regional Setting using SharePoint JSCOM - Softree Technology","og_description":"This article will help you to change the user regional setting based on supported ui languages presents on\u00a0SharePoint online site. [code lang=&#8221;c&#8221;] &lt;a href=&#8221;http:\/\/blog.softreeconsulting.com\/wp-content\/uploads\/2017\/01\/userregionsetting.png&#8221;&gt;&lt;img class=&#8221;aligncenter size-full wp-image-669&#8243; src=&#8221;https:\/\/blog.softreeconsulting.com\/wp-content\/uploads\/2017\/01\/userregionsetting.png&#8221; alt=&#8221;userregionsetting&#8221; width=&#8221;1018&#8243; height=&#8221;348&#8243; \/&gt;&lt;\/a&gt; SP.SOD.executeFunc(&#8220;sp.js&#8221;, &#8220;SP.ClientContext&#8221;, function () { SP.SOD.registerSod(&#8220;sp.userprofiles.js&#8221;, SP.Utilities.Utility.getLayoutsPageUrl(&#8220;sp.userprofiles.js&#8221;)); SP.SOD.executeFunc(&#8220;sp.userprofiles.js&#8221;, &#8220;SP.UserProfiles.PeopleManager&#8221;, ManageUserRegionSetting); }); function ManageUserRegionSetting() { var oContext = SP.ClientContext.get_current(); var web = oContext.get_web(); var peopleManager = new SP.UserProfiles.PeopleManager(oContext); userProfileProperties [&hellip;]","og_url":"https:\/\/softreetechnology.com\/blog\/office-365\/user-regional-setting-using-sharepoint-jscom\/","og_site_name":"Softree Technology","article_published_time":"2017-01-31T16:45:53+00:00","author":"admin","twitter_card":"summary_large_image","twitter_misc":{"Written by":"admin","Est. reading time":"1 minute"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/softreetechnology.com\/blog\/office-365\/user-regional-setting-using-sharepoint-jscom\/#article","isPartOf":{"@id":"https:\/\/softreetechnology.com\/blog\/office-365\/user-regional-setting-using-sharepoint-jscom\/"},"author":{"name":"admin","@id":"https:\/\/softreetechnology.com\/blog\/#\/schema\/person\/98740297642f06debccdcee2de84086b"},"headline":"Modify User Regional Setting using SharePoint JSCOM","datePublished":"2017-01-31T16:45:53+00:00","mainEntityOfPage":{"@id":"https:\/\/softreetechnology.com\/blog\/office-365\/user-regional-setting-using-sharepoint-jscom\/"},"wordCount":295,"commentCount":0,"publisher":{"@id":"https:\/\/softreetechnology.com\/blog\/#organization"},"articleSection":["Office 365"],"inLanguage":"en","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/softreetechnology.com\/blog\/office-365\/user-regional-setting-using-sharepoint-jscom\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/softreetechnology.com\/blog\/office-365\/user-regional-setting-using-sharepoint-jscom\/","url":"https:\/\/softreetechnology.com\/blog\/office-365\/user-regional-setting-using-sharepoint-jscom\/","name":"Modify User Regional Setting using SharePoint JSCOM - Softree Technology","isPartOf":{"@id":"https:\/\/softreetechnology.com\/blog\/#website"},"datePublished":"2017-01-31T16:45:53+00:00","breadcrumb":{"@id":"https:\/\/softreetechnology.com\/blog\/office-365\/user-regional-setting-using-sharepoint-jscom\/#breadcrumb"},"inLanguage":"en","potentialAction":[{"@type":"ReadAction","target":["https:\/\/softreetechnology.com\/blog\/office-365\/user-regional-setting-using-sharepoint-jscom\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/softreetechnology.com\/blog\/office-365\/user-regional-setting-using-sharepoint-jscom\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/softreetechnology.com\/blog\/"},{"@type":"ListItem","position":2,"name":"Modify User Regional Setting using SharePoint JSCOM"}]},{"@type":"WebSite","@id":"https:\/\/softreetechnology.com\/blog\/#website","url":"https:\/\/softreetechnology.com\/blog\/","name":"Softree Technology","description":"Celebrating 10+ Years in SharePoint Consulting !","publisher":{"@id":"https:\/\/softreetechnology.com\/blog\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/softreetechnology.com\/blog\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en"},{"@type":"Organization","@id":"https:\/\/softreetechnology.com\/blog\/#organization","name":"Softree Technology","url":"https:\/\/softreetechnology.com\/blog\/","logo":{"@type":"ImageObject","inLanguage":"en","@id":"https:\/\/softreetechnology.com\/blog\/#\/schema\/logo\/image\/","url":"https:\/\/softreetechnology.com\/blog\/wp-content\/uploads\/2023\/03\/cropped-white-logo-soft.png","contentUrl":"https:\/\/softreetechnology.com\/blog\/wp-content\/uploads\/2023\/03\/cropped-white-logo-soft.png","width":844,"height":230,"caption":"Softree Technology"},"image":{"@id":"https:\/\/softreetechnology.com\/blog\/#\/schema\/logo\/image\/"}},{"@type":"Person","@id":"https:\/\/softreetechnology.com\/blog\/#\/schema\/person\/98740297642f06debccdcee2de84086b","name":"admin","image":{"@type":"ImageObject","inLanguage":"en","@id":"https:\/\/softreetechnology.com\/blog\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/6fc78c8a7aa3fb0bf43c3b9a2e3962d7?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/6fc78c8a7aa3fb0bf43c3b9a2e3962d7?s=96&d=mm&r=g","caption":"admin"},"sameAs":["https:\/\/softreeconsulting.com"],"url":"https:\/\/softreetechnology.com\/blog\/author\/admin\/"}]}},"_links":{"self":[{"href":"https:\/\/softreetechnology.com\/blog\/wp-json\/wp\/v2\/posts\/663","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/softreetechnology.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/softreetechnology.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/softreetechnology.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/softreetechnology.com\/blog\/wp-json\/wp\/v2\/comments?post=663"}],"version-history":[{"count":0,"href":"https:\/\/softreetechnology.com\/blog\/wp-json\/wp\/v2\/posts\/663\/revisions"}],"wp:attachment":[{"href":"https:\/\/softreetechnology.com\/blog\/wp-json\/wp\/v2\/media?parent=663"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/softreetechnology.com\/blog\/wp-json\/wp\/v2\/categories?post=663"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/softreetechnology.com\/blog\/wp-json\/wp\/v2\/tags?post=663"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}