Forum Discussion
Modern Communication Site: Can't rename Site title
Conax I can change the title of modern Communication Sites, using the Set-PnPWeb -Title "" command. it just keeps flipping back to the original title. Sometimes after days sometimes after a few minutes. I've tried switching off language settings in site and at the hub site level but with no luck. This is really strange. Anyone got any tips?
Thanks
Ronan
Cillo8383What do you mean by "tried switching off language settings in site"? Did you remove alternate languages or just turn off the multilingual page properties setting? In the language settings of a communication site you have to click on Show advanced settings.
You don't need to do that, however it sounds like there is a mismatch between the site title in one language and the site title in other languages. There are different ways to change the site title in other languages, and "Set-PnPWeb -Title" is not one I would use, but it looks like you have a mismatch between languages.
You can use Gear Icon -> Site Information -> Site name, once for each language your site supports, or turn the multilingual page publishing feature back on, even temporarily, and use Gear Icon -> Site Information -> and click on "Translate site name" under "Site name (English)"
- Cillo8383Jan 10, 2022Copper ContributorAhh. I'm thinking about what you're saying. perhaps i need to only switch off the languages and not multilingual switch? I'll test this now.
- MartinLaplanteJan 10, 2022Iron Contributor$Web.IsMultilingual is, in my opinion, not useful. I always leave it to true, Ten years ago certain web templates didn't support multiple languages, for example the classic teams blog template. It doesn't do anything, I wouldn't change it. Yes, that code should work to remove alternate languages. I see that it is using some language codes for Serbian that are no longer supported in SharePoint Online. You'll want to use 3098 and 2074 for Serbian, 10266 was changed a year or two ago, might still exist on prem.
This is unrelated to the Multilingual Page Publishing feature I was referring to, and since you are using PowerShell and not the graphical UI, there is no need to turn it on or off. It doesn't affect the site title, it just changes the interface for editing the title. If you only use English, then you probably never turned it on, no need to turn it off, removing alternate languages deactivates it anyway. - Cillo8383Jan 10, 2022Copper ContributorMy sites are bound to 365 groups. I think i need to change them in Active Directory. Anyone have a script? thanks
- MartinLaplanteJan 10, 2022Iron ContributorBound to 365 groups? Groups will change the title back. Same with some Teams sites.
- Cillo8383Jan 10, 2022Copper ContributorHi @martinLaplante, This is the first time i've used this platform in a while. Thanks for your response. i have to change 10K site names so i'm sticking with PowerShell to do this. I used the following code which works for the languages, i log in to settings and i can see it's swiched them off. the switch on "site is multilingual" i'm not sure if it's working tbh. I've tested this on a handful of sites, some seem stable for a day. others are jumping back. I can't make sense. perhaps i shouldn't use the $web.ismultilingual switch? We only use English at the moment. so i'm happy to just switch them all off and change title.
$Web.IsMultilingual = $False
#Write-Host -f Green "Removed Language Switch for Site $($web.title)"
$Web.RemoveSupportedUILanguage(1031) #German
$Web.RemoveSupportedUILanguage(1036) #French
$Web.RemoveSupportedUILanguage(2108) #Irish
$Web.RemoveSupportedUILanguage(1057) #Indonesian
$Web.RemoveSupportedUILanguage(1044) #Norwegian (Bokm?l)
$Web.RemoveSupportedUILanguage(1049) #Russian
$Web.RemoveSupportedUILanguage(2052) #Chinese (Simplified)
$Web.RemoveSupportedUILanguage(1028) #Chinese (Traditional)
$Web.RemoveSupportedUILanguage(1081) #Hindi
$Web.RemoveSupportedUILanguage(1086) #Malay
$Web.RemoveSupportedUILanguage(1060) #Slovenian
$Web.RemoveSupportedUILanguage(1030) #Danish
$Web.RemoveSupportedUILanguage(1069) #Basque
$Web.RemoveSupportedUILanguage(1035) #Finnish
$Web.RemoveSupportedUILanguage(1043) #Dutch
$Web.RemoveSupportedUILanguage(1051) #Slovak
$Web.RemoveSupportedUILanguage(1068) #Azerbaijani
$Web.RemoveSupportedUILanguage(1026) #Bulgarian
$Web.RemoveSupportedUILanguage(1110) #Galician
$Web.RemoveSupportedUILanguage(1055) #Turkish
$Web.RemoveSupportedUILanguage(1106) #Welsh
$Web.RemoveSupportedUILanguage(1050) #Croatian
$Web.RemoveSupportedUILanguage(1038) #Hungarian
$Web.RemoveSupportedUILanguage(1042) #Korean
$Web.RemoveSupportedUILanguage(1063) #Lithuanian
$Web.RemoveSupportedUILanguage(1071) #Macedonian
$Web.RemoveSupportedUILanguage(1033) #English
$Web.RemoveSupportedUILanguage(1025) #Arabic
$Web.RemoveSupportedUILanguage(1041) #Japanese
$Web.RemoveSupportedUILanguage(1062) #Latvian
$Web.RemoveSupportedUILanguage(1164) #Dari
$Web.RemoveSupportedUILanguage(1046) #Portuguese (Brazil)
$Web.RemoveSupportedUILanguage(2070) #Portuguese (Portugal)
$Web.RemoveSupportedUILanguage(9242) #Serbian (Latin, Serbia)
$Web.RemoveSupportedUILanguage(1054) #Thai
$Web.RemoveSupportedUILanguage(5146) #Bosnian (Latin)
$Web.RemoveSupportedUILanguage(1029) #Czech
$Web.RemoveSupportedUILanguage(3082) #Spanish
$Web.RemoveSupportedUILanguage(1037) #Hebrew
$Web.RemoveSupportedUILanguage(1045) #Polish
$Web.RemoveSupportedUILanguage(10266) #Serbian (Cyrillic, Serbia)
$Web.RemoveSupportedUILanguage(2074) #Serbian (Latin)
$Web.RemoveSupportedUILanguage(1058) #Ukrainian
$Web.RemoveSupportedUILanguage(1032) #Greek
$Web.RemoveSupportedUILanguage(1061) #Estonian
$Web.RemoveSupportedUILanguage(1040) #Italian
$Web.RemoveSupportedUILanguage(1087) #Kazakh
$Web.RemoveSupportedUILanguage(1053) #Swedish
$Web.RemoveSupportedUILanguage(1066) #Vietnamese
$Web.RemoveSupportedUILanguage(1027) #Catalan
$Web.RemoveSupportedUILanguage(1048) #Romanian
$Web.Update()
Invoke-PnPQuery