Share via


SPLanguageCollection Class

The SPLanguageCollection class represents a collection of SPLanguage objects.

System.Object

   Microsoft.SharePoint.SPBaseCollection

      Microsoft.SharePoint.SPLanguageCollection

Public Properties

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

Name Data Type Description
Count Int32 Gets the number of languages in the collection.
Item Microsoft.SharePoint.SPLanguage Gets the language object at the specified index in the collection.

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 one of the GetInstalledLanguages methods of the SPRegionalSettings class to return the collection of languages in the deployment of Microsoft Windows SharePoint Services.

Use an indexer to return a single language from the collection. For example, assuming 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 object in the collection.

Requirements

Namespace: Microsoft.SharePoint

Platforms: Microsoft Windows Server 2003

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

Security: Code Access Security