Share via


SPLanguage Class

Represents a natural language used within the context of Microsoft Windows SharePoint Services.

Inheritance Hierarchy

System.Object
  Microsoft.SharePoint.SPLanguage

Namespace:  Microsoft.SharePoint
Assembly:  Microsoft.SharePoint (in Microsoft.SharePoint.dll)

Syntax

<SharePointPermissionAttribute(SecurityAction.LinkDemand, ObjectModel := True)> _
<SharePointPermissionAttribute(SecurityAction.InheritanceDemand, ObjectModel := True)> _
Public Class SPLanguage

Dim instance As SPLanguage
[SharePointPermissionAttribute(SecurityAction.LinkDemand, ObjectModel = true)]
[SharePointPermissionAttribute(SecurityAction.InheritanceDemand, ObjectModel = true)]
public class SPLanguage

Remarks

Use the GlobalServerLanguage or ServerLanguage property of the SPRegionalSettings class to return a single SPLanguage object. Otherwise, use the GlobalInstalledLanguages or InstalledLanguages property of the SPRegionalSettings class to return the collection of languages in a deployment of Windows SharePoint Services.

Use an indexer to return a single language from the collection. For example, if the collection is assigned to a variable named myLanguages, use myLanguages[index] in Microsoft Visual C#, or myLanguages (index) in Microsoft Visual Basic, where index is the index number of the language in the collection.

Use the Language property of the SPWeb class to return the locale identifier (LCID) of a language.

Thread Safety

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.

See Also

Reference

SPLanguage Members

Microsoft.SharePoint Namespace