Create Communication Sites with a specific primary language
Summary
Do you want to create a Communication Site in another language? This script will show you how by creating a modern site with the primary language set to a language other than English.
Note
Once you create a site in the primary language you cannot change it, however you can add support for other languages.
$adminUrl = "https://<tenant>-admin.sharepoint.com"
$newSiteUrl = "https://<tenant>.sharepoint.com/sites/Pensaerniaeth"
$ownerEmail = "<your.name@your.email.com>"
$siteTitle = "Pensaerniaeth" # Translates to "Architecture" - Bing Translator
$siteTemplate = "SITEPAGEPUBLISHING#0" # Communication Site Template
$lcid = 1106 # Welsh
$timeZone = 2 # London (https://capa.ltd/sp-timezones)
Connect-PnPOnline -Url $adminUrl -NoTelemetry
New-PnPTenantSite -Template $siteTemplate -Title $siteTitle -Url $newSiteUrl `
-Lcid $lcid -Owner $ownerEmail -TimeZone $timeZone
Write-Host "Script Complete! :)" -ForegroundColor Green
Check out the PnP PowerShell to learn more at: https://aka.ms/pnp/powershell
The way you login into PnP PowerShell has changed please read PnP Management Shell EntraID app is deleted : what should I do ?
To see a list of LCIDs, check out the sample Generate Markdown Report of LCIDs to see the full list
Source Credit
Article first appeared on https://www.pkbullock.com/blog/2018/create-communication-sites-with-a-specific-primary-language-using-pnp-powershell/
Contributors
Author(s) |
---|
Paul Bullock |
Adam Wójcik |
Disclaimer
THESE SAMPLES ARE PROVIDED AS IS WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING ANY IMPLIED WARRANTIES OF FITNESS FOR A PARTICULAR PURPOSE, MERCHANTABILITY, OR NON-INFRINGEMENT.