New-PnPTenantSite : LocaleId 2057 is not a supported locale.

Highlighted
Regular Contributor

Hi,

 

New-PnPTenantSite : LocaleId 2057 is not a supported locale.

 

i am getting while trying to create a site collection with UK English locale for dates and times .

 

1033 is US format.

 

could you please let me know how do i achive it.

 

thanks

11 Replies
Highlighted

When creating a site collection you can only specify a limited number of LCID's (corresponding to the available language packs for SharePoint). After the site collection has been created you can further finetune your regional settings using CSOM Web.RegionalSettings for example or via PowerShell as described in the following blog

http://consulting.risualblogs.com/blog/2016/04/08/sharepoint-online-csom-update-region-settings/

 

This MSDN article lists the LCID's supported when creating a site collection

https://msdn.microsoft.com/en-us/library/microsoft.sharepoint.splanguage.lcid.aspx

 

Hope this helps

 

 

Highlighted

I think this needs to be standardised. 

 

If English is only chosen just because of the language and felt as if it will cater to English UK, its not about language. It impacts the date and time settings, it impacts the alerts, emails which wil get triggered. This sort of setting will mrun a riot in the environment where notification system is in place.

 

I dont know, if it is a technical limitation or kept for future work, but i can't believe a very significant configuration has been left out.

Highlighted

I think this needs to be standardised. 

 

If English is only chosen just because of the language and felt as if it will cater to English UK, its not about language. It impacts the date and time settings, it impacts the alerts, emails which wil get triggered. This sort of setting will mrun a riot in the environment where notification system is in place.

 

I dont know, if it is a technical limitation or kept for future work, but i can't believe a very significant configuration has been left out.

Highlighted
Just to clarify, the regional settings you are looking for are available so I don't see a technical limitation in that. The only thing is you cannot specify them right away when creating your site collection. After the site collection has been created you can go to site settings -> regional settings to make your required changes through the UI or you could automate this using PowerShell.
Highlighted

Thanks Paul for the answer.

 

However, i dont understand why it was kept outside PowerShell.

For administrators, it a nightmare if they have to compartmentalize into UI and PowerShell.

 

Why  -lcid was included in cmdlet if it does not work for all.

I am seeing things off late in the MS space, which does not look like developed by a product company at all.

Highlighted

The LCID you specify when creating your site collection determines the default language of the site and that works fine if you know the supported LCID's 

 

I can imagine it would be convenient for you to be able to directly specify the regional settings as well. If it's really important to you, you could go and create your own PowerShell cmdlet based on the exsting one and provide for the additonal functionality that way. The available cmdlets are all Open Source on GitHub and scenario's like yours are great opportunities to contribute!

Highlighted

Thanks Paul.

 

Could you please let me know how do i go about changing a param.

 

This is a bit grey area for me, is it something that i have to make change to a shell.

Highlighted

First of all you'd need developer skills to get started or find someone who has. Windows PowerShell provides an SDK and allows developers to implement new cmdlets.  

 

Easiest then is to find the implementation of the existing cmdlet in the Git Repository, see how it works and implement your requirements there

https://github.com/SharePoint/PnP-PowerShell/blob/08eb375ccf51ed8c04e8df13ae4fc617fda47377/Commands/...

 

I won't go changing the existing param. Instead I'd add an (optional) additonal one (RegionLcid for example) or consider implementing a new cmdlet. Then implement the logic required to change the regional settings after the site has been created (as described in the blog I referred to in my first reply, for example).

 

General Guidance on how to contribute to PnP initiative is located here

https://github.com/SharePoint/PnP-PowerShell/blob/08eb375ccf51ed8c04e8df13ae4fc617fda47377/CONTRIBUT...

 

Hope this helps

Highlighted
Highlighted

@Paul Pascha In your answer to the question you refer to a microsoft resource containing the language id's. Locale id's will do more than only change the language, but also formatting etc.

 

According to https://docs.microsoft.com/en-us/previous-versions/office/sharepoint-server/ms462988(v%3Doffice.15) The locale id of 2057 should enable UK-locale settings.

 

But I also receive the same error;

New-SPOSite : LocaleId 2057 is not a supported locale.
At line:1 char:1

Highlighted

@Micha_Plexsyswhen creating a new site you cannot specify 2057 as the LCID. The LCIDs supported when creating a new site are listed in the article below as part of the SPLanguage class. The SPLocale class exists to support a site's Regional Settings which can be applied after creating the site.

 

https://docs.microsoft.com/en-us/previous-versions/office/sharepoint-server/ms442852(v=office.15)