How to Enable Multi Language Settings in a SharePoint Office 365 Site Programmatically Using C# Client Site Object Model (CSOM)

Sathish Nadarajan
SharePoint MVP
Published On :   07 Jul 2017
Visit Count
Today :  4    Total :   2100

As I said earlier articles, during the deployment we need to do a series of actions. As part of that, let us see, how to enable the multi-language settings and select the languages.

The settings in the screen is available on the Site Settings.



Now, let us see the code, which will enable and select few languages as alternate languages.

 using Microsoft.SharePoint.Client;
 namespace Office365.Console
     class Program
         static void Main(string[] args)
         public static void ConfigureSearchCentreURL()
             OfficeDevPnP.Core.AuthenticationManager authMgr = new OfficeDevPnP.Core.AuthenticationManager();
             string sourceSiteUrl = "https://******";
             string userName = "Sathish@******";
             string password = "******";
             var clientContext = authMgr.GetSharePointOnlineAuthenticatedContextTenant(sourceSiteUrl, userName, password);
             Web web = clientContext.Web;
             web.IsMultilingual = true;
             web.AddSupportedUILanguage(1033); // English
             web.AddSupportedUILanguage(1031); // German
             web.AddSupportedUILanguage(1036); // French
             web.AddSupportedUILanguage(1046); // Portugese (Brazil)
             web.AddSupportedUILanguage(1049); // Russian
             web.AddSupportedUILanguage(2052); // Chinese (Simplified)
             web.AddSupportedUILanguage(3082); // Spanish

Happy Coding,

Sathish Nadarajan.