SPLocale Class
The SPLocale class represents regional settings for a locale that is represented on the site.
System.Object
Microsoft.SharePoint.SPLocale
Public Properties
The following table shows the public properties of the SPLocale class, the data type of each property, and a brief description of each.
Name | Data Type | Description |
---|---|---|
DisplayName | String | Gets the name of the locale as it is displayed in the user interface. |
LCID | Int32 | Gets the locale identifier (LCID) for the locale. |
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 Locale property of the SPWeb class to return the locale for a subsite. Otherwise, use the Locales property of the SPRegionalSettings class to return an SPLocaleCollection object that represents the collection of locales for the subsite. Use an indexer to return a single locale from the collection. For example, if the collection is assigned to a variable named myLocales, use myLocales[index]
in C#, or myLocales(index)
in Visual Basic .NET, where index is the index number of the locale in the collection.
Requirements
Namespace: Microsoft.SharePoint
Platforms: Microsoft Windows Server 2003
Assembly: Microsoft.SharePoint (in Microsoft.SharePoint.dll)
Security: Code Access Security