Logo 
Search:

Sharepoint 2010 Articles

Submit Article
Home » Articles » Sharepoint 2010 » GeneralRSS Feeds

Get all the languages packs installed on web servers in the SharePoint 2010 farm

Posted By: Vijai Anand Ramalingam     Category: Sharepoint 2010     Views: 1855

In this article we will be seeing how to get all the languages packs installed on web servers in the SharePoint 2010 farm.

 

Steps Involved:

·         Open Visual Studio 2010.

·         Go to File => New => Project.

·         Select Console Application Template from the installed templates.

·         Enter the name and click on Ok.

·         Add the following assembly.

o    Microsoft.SharePoint.dll

·         Add the following Namespace.

o    Using Microsoft.SharePoint;

·         Replace Program.cs with the following code.

 

using System;

using System.Collections.Generic;

using System.Linq;

using System.Text;

using Microsoft.SharePoint;

 

namespace Languages

{

    classProgram

    {

        staticvoid Main(string[] args)

        {

            using (SPSite site = newSPSite("http://serverName:22222/sites/Test/"))

            {

                using (SPWeb web = site.RootWeb)

                {

                    SPLanguageCollection installedLanguages = web.RegionalSettings.InstalledLanguages;

                    foreach (SPLanguage language in installedLanguages)

                    {

                        Console.WriteLine("Name: {0}, LCID:{1}", language.DisplayName, language.LCID);

                    }

                    Console.ReadLine();

                }

            }

        }

    }

}     

         

 

 

·         Build the solution.

·         Hit F5.

            Languages.png

Share: 



Vijai Anand Ramalingam
Vijai Anand Ramalingam author of Get all the languages packs installed on web servers in the SharePoint 2010 farm is from India. Vijai Anand Ramalingam says Hello Everyone,
I am Vijai Anand Ramalingam from India
 
View All Articles

 
Please enter your Comment

  • Comment should be atleast 30 Characters.
  • Please put code inside [Code] your code [/Code].

 
No Comment Found, Be the First to post comment!