1
votes

I am working on a Powershell script to create new SharePoint sites using the Pattern and Practices libraries. I need to change the locale and add an alternative language to "Classic Team" sites.

Is this possible with the PnP library?

Thanks.

1

1 Answers

4
votes

You can use the get-pnpcontext cmdlet. So to add e.g. German (LCID 1031) to your sharepoint site you can use:

$Context = Get-PnPContext
$Web = $Context.Web
$Context.Load($Web)
Invoke-PnPQuery

$Web.IsMultilingual = $true
$Web.AddSupportedUILanguage(1031)
$Web.Update()
Invoke-PnPQuery