Create Modern Sites as alternative primary language
Create a modern site in another language as the 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.

$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
$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
$storageQuota = 1000
Connect-SPOService $adminUrl
New-SPOSite -Template $siteTemplate -Title $siteTitle -Url $newSiteUrl `
-LocaleId $lcid -Owner $ownerEmail -TimeZoneId $timeZone -StorageQuota $storageQuota
Write-Host "Script Complete! :)" -ForegroundColor Green
$newSiteUrl = "https://<tenant>.sharepoint.com/sites/Pensaerniaeth"
$siteTitle = "Pensaerniaeth"
$lcid = 1106
$m365Status = m365 status
if ($m365Status -match "Logged Out") {
m365 login
}
m365 spo site add --type CommunicationSite --url $newSiteUrl --title $siteTitle --lcid $lcid
Write-Host "Script Complete! :)" -ForegroundColor Green
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.
Tool documentation & references
- Want to learn more about PnP PowerShell and the cmdlets
Check out the PnP PowerShell site to get started and for the reference to the cmdlets.
- Introduction to the SharePoint Online Management Shell
Check out the SPO Management Shell documentation site to get started and for the reference to the cmdlets.
- Want to learn more about CLI for Microsoft 365 and the commands
Check out the CLI for Microsoft 365 site to get started and for the reference to the commands.