Click or drag to resize
SiteCultureConstraintMatch Method (IHttpContext, String, IDictionaryString, Object, Boolean)
Determines whether the URL parameter contains an allowed culture code for this constraint.

Namespace: Kentico.Content.Web.Mvc
Assembly: Kentico.Content.Web.Mvc (in Kentico.Content.Web.Mvc.dll) Version: 13.0.131
Syntax
C#
protected override bool Match(
	IHttpContext httpContext,
	string routeKey,
	IDictionary<string, Object> values,
	bool isUrlGeneration
)

Parameters

httpContext
Type: CMS.Base.InternalIHttpContext
Object that encapsulates information about the HTTP request.
routeKey
Type: SystemString
Name of the parameter that is being checked.
values
Type: System.Collections.GenericIDictionaryString, Object
Object that contains the parameters for the URL.
isUrlGeneration
Type: SystemBoolean
Indicates whether the constraint check is being performed when an incoming request is being handled or when a URL is being generated.

Return Value

Type: Boolean
True if the URL parameter contains an allowed culture code; otherwise, false.
Remarks
When the culture code is empty the default value is retrieved based on these priorities: - Site domain alias visitor culture - Site default visitor culture - User preferred content culture - Browser culture - Default culture (from application settings). The evaluated culture is used to set the current thread culture for localization to work correctly.
See Also