Updating Regional Settings of a Web Site in SharePoint

This sounds like a simple thing right? Just set the Locale of the SPWeb object to the locale you are interested in. Not so fast – this does not work, it will change the Locale but not things like the calendar being used. What you have to do is to create a new instance of SPRegionalSettings and set a few properties like LocaleId, CalendarType and Time24.

Here is a code snippet that does just this:
CultureInfo ci = new CultureInfo(your culture);
SPRegionalSettings rs = new SPRegionalSettings(web, false);
rs.LocaleId = (uint)ci.LCID;
rs.Time24 = rs.GetDefaultTime24((uint)ci.LCID);
rs.CalendarType = (short)rs.GetDefaultCalendarType(ci.LCID);
web.RegionalSettings = rs;
web.Update();
I spent several hours trying to figure this out, so I hope this will help someone else trying to do the same.
 

SharePoint Online

The cloud parts are functional components that extend your SharePoint Online environment in Microsoft 365.

Supports Classic and Modern sites for SharePoint Online/Microsoft 365

SharePoint

Top SharePoint Online Products

Experience greater power and savings by bundling our SharePoint apps and cloud parts.


Calendar Plus


Chart Plus


Knowledge Base


Project Management Central


Simple List Search

 

On-Premises Only

These web parts extend SharePoint beyond its out-of-the-box capabilities by tailoring it to your requirements with Bamboo Solution’s growing portfolio of SharePoint Web Parts.

SharePoint 2013, 2016, 2019 – Classic Pages Only

SharePoint

Top On-Premises Only Products

Experience greater power and savings by bundling our SharePoint apps and web parts.


Calendar Plus


Data Viewer


Password Change


Password Expiration


Password Reset

 

Our team of Microsoft 365 experts help you get the most out of your Microsoft technology, we have the best Microsoft 365 talent to streamline your organization.

Streamline Your Department

We Have What You Need

Bamboo Solutions

Tools


Resources


Bamboo Installer