question

BGRachanaSgGscCenBscDso-7946 avatar image
0 Votes"
BGRachanaSgGscCenBscDso-7946 asked ·

How can we activate multilingual feature on SharePoint online using pnp

Hi ,

How can we activate multilingual feature on SharePoint online using pnp.
I want to do same configuration programmatically, the setting explained in the section "Enable the multilingual feature and choose languages" here https://support.microsoft.com/en-us/office/create-multilingual-communication-sites-pages-and-news-2bb7d610-5453-41c6-a0e8-6f40b3ed750c#bkmk_enable

office-sharepoint-online
10 |1000 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

BGRachanaSgGscCenBscDso-7946 avatar image
0 Votes"
BGRachanaSgGscCenBscDso-7946 answered ·

Hi @EchoDu-MSFT Thanks for your reply.

I already activated this feature and getting "Enable pages and news to be translated into multiple languages"
option.
I wanted to set it on( slide the toggle to On) by pnp code and add alternative language.
Was able to do it, we need to activate one more feature "MultilingualPages"

enable MultilingualPages feature

Enable-PnPFeature -Identity 24611c05-ee19-45da-955f-6602264abaf8

$Web = Get-PnPWeb -Includes RegionalSettings.InstalledLanguages
$Web.RegionalSettings.InstalledLanguages
$Web.IsMultilingual = $true
$Web.AddSupportedUILanguage(1036)
$Web.Update()
Invoke-PnPQuery

· 1 ·
10 |1000 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

Hi @BGRachanaSgGscCenBscDso-7946 ,

Thanks for your enthusiasm for sharing.

You can mark your answer so that other users in need can learn from it.

Have a nice day!

Thanks,
Echo Du

1 Vote 1 ·
EchoDu-MSFT avatar image
0 Votes"
EchoDu-MSFT answered ·

Hello @BGRachanaSgGscCenBscDso-7946 ,

If you want to enable multilingual feature support on a Team site you can do so by activating a hidden feature called SitePagePublishing using PnP PowerShell as a site owner.

 Connect-PnPOnline https://contoso.sharepoint.com/sites/mysite
 Enable-PnPFeature -Identity f39dad74-ea79-46ef-9ef7-fe2370754f6f

73544-1.png

73530-2.png

Thanks,
Echo Du
===============
If an Answer is helpful, please click "Accept Answer" and upvote it.
Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.





1.png (40.5 KiB)
2.png (12.3 KiB)
·
10 |1000 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.