How can we activate multilingual feature on SharePoint online using pnp

BG Rachana Sg GscCenBscDso 96 Reputation points
2021-03-02T08:15:48.06+00:00

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

SharePoint
SharePoint
A group of Microsoft Products and technologies used for sharing and managing content, knowledge, and applications.
9,565 questions
0 comments No comments
{count} votes

Accepted answer
  1. BG Rachana Sg GscCenBscDso 96 Reputation points
    2021-03-03T08:00:42.957+00:00

    Hi @Echo Du_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 additional answer

Sort by: Most helpful
  1. Echo Du_MSFT 17,116 Reputation points
    2021-03-03T01:44:24.35+00:00

    Hello @BG Rachana Sg GscCenBscDso ,

    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.

    0 comments No comments