Expand Minimize
This topic has not yet been rated - Rate this topic

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
)

Parameters

user
Type: Microsoft.SharePoint.SPUser
User object to pass into the provider to get the context
web
Type: Microsoft.SharePoint.SPWeb
Web to use to build the URL from
source
Type: System.String
Source page URL
editorUri
Type: System.Uri
Uri object to populate

Return value

Type: System.Boolean
True if the editor URI was populated, false otherwise.
Did you find this helpful?
(1500 characters remaining)

Community Additions

ADD
© 2013 Microsoft. All rights reserved.