SPLanguage Class

The SPLanguage class represents a natural language used within the context of Microsoft Windows SharePoint Services.

System.Object

   Microsoft.SharePoint.SPLanguage

Public Properties

The following table shows the public properties of the SPLanguage class, the data type of each property, and a brief description of each.

Name Data Type Description
DisplayName String Gets the name of the language as displayed in the user interface.
LCID Int32 Gets the locale identifier (LCID) for the language.

Thread Safety

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

Remarks

Use the Language property of either the SPFile or SPWeb class, or one of the GetServerLanguage methods of the SPRegionalSettings class, to return a single language. Otherwise, use one of the GetInstalledLanguages methods 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 C#, or myLanguages(index) in Visual Basic .NET, where index is the index number of the language in the collection.

Requirements

Namespace: Microsoft.SharePoint

Platforms: Microsoft Windows Server 2003

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

Security: Code Access Security