Locale differences within WSS 2.0

‘The language is not supported on the server’ and SharePoint development.
 
I have recently been developing a C# Console Application to automate the upload process of existing documents from a folder structure into WSS 2.0. My development and testing had been going well especially considering this was my first taste of developing against SharePoint. When I ran my application on a test server the documents, and the relevant folder structures were created and uploaded successfully. The problems started to occur when I ran the application on the client’s server.
 
The application would not even create the initial site required to store the Shared Documents and just returned an error – The language is not supported on the server. Having been burned by so called ‘language’ issues before I first checked the Regional Settings for the server and they were identical to my test machine. Plan B – surf the net for a fellow techie who had encountered the same problem and solution. Although this error was well documented on the net it was more to do with the installation of SharePoint rather than developing against it. However, it did lead me down the righ path, namely then InstalledLanguages registry entry.
 
I tweaked my console application to display the list of sites within a SharePoint web and the associated Locale ID and it highlighted the reason for my error. On my test server the sites were configured with a Locale ID of 1033 (English – United States) but on the live server they were configured to use 3081 (English – Australia). The question was, how can I convince SharePoint to use the locale id of 3081.
 
The answer comes in two parts;
  1. first of all I updated the registry on the live server. The key HKEY_LOCAL_MACHINESOFTWAREMicrosoftShared ToolsWeb Server Extensions6.0InstalledLanguages already had a REG_SZ value for 1033 so I added a second one for 3081.
  2. The next task was to create the relevant folders in the SharePoint virtual directory for the site templates. To do this I made the following changes;
    • Make a copy of the C:Program FilesCommon FilesMicrosoft Sharedweb server extensions60TEMPLATE1033 folder including all its contents and rename it to 3081.
    • Make a copy of the C:Program FilesCommon FilesMicrosoft Sharedweb server extensions60TEMPLATEADMIN1033 folder including all it contents and rename it to 3081.
    • Make a copy of the C:Program FilesCommon FilesMicrosoft Sharedweb server extensions60TEMPLATELAYOUTS1033 folder including all of its contents and rename it to 3081.
  3. Restart IIS.

This now provides SharePoint with the template structure it needs to create new sites using the Locale ID of 3081. When I ran my Console Application this time the sites were created successfully and my Shared Documents folders now contained the uploaded files.

Advertisements

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