다음을 통해 공유


SPLocaleCollection Class

Represents a collection of SPLocale objects.

Inheritance Hierarchy

System.Object
  Microsoft.SharePoint.Administration.SPAutoSerializingObject
    Microsoft.SharePoint.SPBaseCollection
      Microsoft.SharePoint.SPLocaleCollection

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

Syntax

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

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

Remarks

Use the Locales property of the SPRegionalSettings class to return the collection of locales for a site.

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

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

SPLocaleCollection Members

Microsoft.SharePoint Namespace