SPUtility.TryGetLanguageAndRegionSettingsEditorUrl method
Helper method that will perform the following logic to get the language and region settings URL: If usersettingsprovider exists, is valid, and a user is supplied, get the URI form the provider. Else get the local site user regional settings page. This method encapsulates logic used in various locations throughout Sharepoint to get to a viable Language and Region editor.
Namespace: Microsoft.SharePoint.Utilities
Assembly: Microsoft.SharePoint (in Microsoft.SharePoint.dll)
Syntax
'Declaration
Public Shared Function TryGetLanguageAndRegionSettingsEditorUrl ( _
user As SPUser, _
web As SPWeb, _
source As String, _
<OutAttribute> ByRef editorUri As Uri _
) As Boolean
'Usage
Dim user As SPUser
Dim web As SPWeb
Dim source As String
Dim editorUri As Uri
Dim returnValue As Boolean
returnValue = SPUtility.TryGetLanguageAndRegionSettingsEditorUrl(user, _
web, source, editorUri)
public static bool TryGetLanguageAndRegionSettingsEditorUrl(
SPUser user,
SPWeb web,
string source,
out Uri editorUri
)
Parameters
user
Type: Microsoft.SharePoint.SPUserUser object to pass into the provider to get the context
web
Type: Microsoft.SharePoint.SPWebWeb to use to build the URL from
source
Type: System.StringSource page URL
editorUri
Type: System.UriUri object to populate
Return value
Type: System.Boolean
True if the editor URI was populated, false otherwise.