0
votes

Can any one tell me how to create sharepoint 2013 variation labels using client side object model(CSOM).I know it is possible using SSOM and power shell.

Thanks in advance.

1

1 Answers

0
votes

How to create Variation Labels in SharePoint 2013/Online via CSOM

VariationsClient class is intended for managing Variation Labels in SharePoint 2013.

The following operations are currently supported:

  • VariationsClient.CreateLabel method is used for create Variation Label
  • VariationsClient.GetLabelsList method gets Variation Labels on site

Usage

var variationsClient = new VariationsClient(ctx);
var siteLanguages = new[] {"en-US","ru-RU","fi-FI","nl-NL"};
foreach (var language in siteLanguages)
{
   var isSource = (language == "en-US");
   variationsClient.CreateLabel(new CultureInfo(language), isSource);    
}

Result

enter image description here