Gerry
Gerry

Reputation: 73

Setting regional settings in new sharepoint site collection

When I create a new sharepoint site collection, is there some way I can automatically set the regional settings to my local settings as part of the creation process? In particular, I want to set the default date/time format to be non-US.

Thanks

Upvotes: 1

Views: 1264

Answers (1)

Temple
Temple

Reputation: 1079

using code, you should check out the RegionalSettings of the SPWeb. For example, this would set it to UK (I've done this in on a Custom Site Definition):

CultureInfo cultureInfo = new CultureInfo("en-GB");
web.RegionalSettings.LocaleId = (uint)cultureInfo.LCID;
web.Update();

Upvotes: 1

Related Questions