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

  • editorUri
    Type: System.Uri

    Uri object to populate

Return value

Type: System.Boolean
True if the editor URI was populated, false otherwise.

See also

Reference

SPUtility class

SPUtility members

Microsoft.SharePoint.Utilities namespace