Navigate to the Central Administration. Click on Application Management. Click on Manage service applications which is available under Service Applications. Click on MMS (Managed Metadata Service). Click on MMS (default keyword term store) termstore in the Taxonomy Term Store. In the right hand side you can see the Working languages for the term store. Select Other locales from the drop down to see the other languages for the term store. In this blog you will see how to add a language to the term store. I am going to add French – France language to the MMS term store [LCID – 1036].
Steps Involved:
1. Open Visual Studio 2012 (Run as administrator).
2. Go to File=> New => Project.
3. Select Console Application in the Visual C# node from the installed templates.
4. Enter the Name and click on Ok.
5. In the solution explorer, right click on References folder and then click on Add Reference.
6. Add the following assemblies from 15 hive (C:\Program Files\Common Files\microsoft shared\Web Server Extensions\15\ISAPI).
a. Microsoft.SharePoint.Client.dll
b. Microsoft.SharePoint.Client.Runtime.dll
c. Microsoft.SharePoint.Client.Taxonomy.dll
7. Open Program.cs file and replace the code with the following
using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; using Microsoft.SharePoint.Client; using Microsoft.SharePoint.Client.Taxonomy; using System.Collections.ObjectModel; namespace ManagedMetadataClient { class Program { static void Main(string[] args) { // ClienContext - Get the context for the SharePoint Site // SharePoint site URL - http://c4968397007/ ClientContext clientContext = new ClientContext("http://c4968397007/"); // Get the TaxonomySession TaxonomySession taxonomySession = TaxonomySession.GetTaxonomySession(clientContext); // Get the term store by name TermStore termStore = taxonomySession.TermStores.GetByName("MMS"); // Add the language termStore.AddLanguage(1036); // Commit all the changes termStore.CommitAll(); // Execute the query to the server clientContext.ExecuteQuery(); } } }
|
French - France language will be added successfully.
[Note: Site Collection http://c4968397007/ is associated with MMS service application].