Friday, September 19, 2008

Code snippet to get all installed languages from sharepoint server Farm


I had a requirement to display all installed languages of a SharePoint server farm in a DropDownList.

Regional Settings of SPWeb has a property named "SPWeb.RegionalSettings.InstalledLanguages", which returns language collection of type
"SPLanguageCollection". The following are the properties of "SPLanguage" instance.





Use the "Display Name" property to get the language display name ex. English and "LCID" property to get the locale ID ex. 1033(for English).
See the below code snippet, which will be used to get the installed languages from a SharePoint server farm.



Hope this will be helpful

No comments: