Nick Grattan's Blog

About Microsoft SharePoint, .NET, Natural Language Processing and Machine Learning

“Regional Settings” and “Central Administration”

with 9 comments

Regional Settings for sites can be set in one of two ways:

1. Site Actions + Site Settings + Modify All Site Settings and then select the “Regional Settings” link under “Site Administration”. This allows default regional settings to be applied to all users.

2. An individual user can select the “Welcome” menu, and then “My Settings”:

Regional1

The User Information form has a “My Regional Settings” link that can be used to change the regional settings to be used when that user visits a site:

Regional2

So what about changing regional settings for “Central Administration”? Well, you might be suprised that the “Regional Settings” link is missing from the “Site Settings” page, so the regional settings cannot be changed that way. 

All right, what about changing the regional settings for the logged on user using “My Settings”? Well, it turns out that the “My Regional Settings” option is missing from the form when accessed through “Central Administration”!

It seems that applying regional settings to “Central Administration” is not supported through the user interface. You can, however, change the locale for “Central Administration” through code:

using (SPSite siteCollection = new SPSite

     (http://localhost:9000”))

{

   SPWeb rootWebSite = siteCollection.RootWeb;

   SPWeb webSite = siteCollection.OpenWeb(rootWebSite.ID);

   webSite.Locale = CultureInfo.CreateSpecificCulture(“en-GB”);

   webSite.Update();

   rootWebSite.Dispose();

   webSite.Dispose();

}

This code opens the site collection for “Central Administration” (which on this server has the port number 9000 – change this to your own port number). It then finds and opens the root web, creates a local for UK English, updates the web site and disposes the objects. Remember to add a reference to sharepoint.dll and add the following using statements:

using System.Globalization;

using Microsoft.SharePoint;

Note the default setting can be applied by using “en-US” for the locale.

The following diagram shows that the date ordering for the timer job status form is now in dd/mm/yyyy format:

Regional3

I’m not entirely comfortable in changing the regional settings in this way and would not recommend this change on a production server without extensive testing. While it works I feel that the option to change regional settings in “Central Administration” must have been left out by Microsoft for a good reason – perhaps it breaks something.

Advertisements

Written by Nick Grattan

September 1, 2007 at 12:31 pm

9 Responses

Subscribe to comments with RSS.

  1. I found if you copy from main portal sites regional settings page (_layouts/regionalsetng.aspx) and paste on the end of central admin page (http://centraladmin:45505/_layouts/regionalsetng.aspx) – the regional settings will be displayed for central administration page and locale etc can be set…

    Peter M

    October 3, 2007 at 1:50 am

  2. Do you know how to get the regional settings as an option for users with “read” access only? Currently, when they go to “my settings” there is no available selection for “my regional settings”.

    james hesse

    February 11, 2008 at 7:41 pm

  3. I set the time zone to Tehran in regional settings. But clock is not true and it shows time as one houre later. I want to know what I can do to change the clock. Actually the server clock is set to right time. would you please help me?!

    Layla

    May 18, 2008 at 12:32 pm

  4. […] did find some solutions though – I particularly like the way that is transpires that the regional settings page is there, but that […]

    • Thanks a lot……

      It was Very Helpfull

      Gopi Nathan

      September 24, 2009 at 11:53 am

  5. How can we set the locale of a sharepoint site for a particular user according to his/her system locale through coding???

    Aniket

    December 21, 2011 at 2:29 pm

  6. Hi Nick
    A somewhat related question:
    If, for some reason, I do not want to change the web Regional Settings, but want the individual user profiles to change their Locale setting (to display another date format). Rather than asking 100s od users to make the change, do you know of some way to centrally change the settings for all users ‘My Regional Settings’?

    Regards
    NIk

    Nikolaj V

    October 7, 2013 at 3:41 pm

  7. […] This  blog entry describes how to use Microsoft PowerShell with the SharePoint and MOSS 2007 object model. Here is an example script that allows the regional settings for a site to be changed and follows the C# example presented here. […]


Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: