SPUtility.TryGetLanguageAndRegionSettingsEditorUrl method

SharePoint 2013

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)

public static bool TryGetLanguageAndRegionSettingsEditorUrl(
	SPUser user,
	SPWeb web,
	string source,
	out Uri editorUri


Type: Microsoft.SharePoint.SPUser

User object to pass into the provider to get the context

Type: Microsoft.SharePoint.SPWeb

Web to use to build the URL from

Type: System.String

Source page URL

Type: System.Uri

Uri object to populate

Return value

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