I am working on a sharepoint server 2013. and i have created an event receiver which get fired when an item is updated.
now inside the event receiver i want to create a new sub-site as follow:-
SPWeb newSite = spCurrentSite.Webs.Add(
curItemID,
curItemSiteName,"created automatically after adding a new project item",
Convert.ToUInt16(1033),
webTemplate,
false,
false
);
newSite.Update();and one confusing parameter is the LocalID i need to pass. so i am not sure which value i need to pass? now inside the above example i am passing 1033, but our customer is a UK-based company so should i be passing local ID = 2057 instead?
now i did the following experiments to try to understand our current local ID:-
1. i run this power-shell script to get the localID for one of our sharepoint sites:-
$SiteUrl = "http://servername/sites/HR/subsiteA/" $site = Get-SPWeb $SiteUrl write-host $site.Language $site.Dispose()
I will get 1033
2. i run these 2 power-shell scripts (Get-UICulture & Get-Host) to get the local for our on-premise windows server:-
PS C:\Windows\system32> Get-UICulture
LCID Name DisplayName
---- ---- -----------
1033 en-US English (United States)
PS C:\Windows\system32> Get-Host
Name : ConsoleHost
Version : 3.0
InstanceId : **********************************
UI : System.Management.Automation.Internal.Host.InternalHostUserI
nterface
CurrentCulture : en-GB
CurrentUICulture : en-US
PrivateData : Microsoft.PowerShell.ConsoleHost+ConsoleColorProxy
IsRunspacePushed : False
Runspace : System.Management.Automation.Runspaces.LocalRunspace3. i went to "Central Admin" >> "Upgrade and Migration" >> "check product and patch installation status", i got three rows mentioned that the language is 1033:-
so i am confused on these:-
1. can i set my sub-site inside the above code to be 2057 instead of 1033 since our customer is a UK-Based ? or sharepoint does not support having localId=2057 for a site collection or for a sub-site?
2. Am I having any problem that i am using local=1033 ,, although the company culther such as date format and other regional setting is a UK based not US based ? as seems inside sharepoint if a site collection localID=1033 i can still set its regional settings as UK ..