C# Class Worki.Infrastructure.MultiCultureMvcRouteHandler

Inheritance: MvcRouteHandler
Datei anzeigen Open project: tah91/eworkyWebSite

Public Properties

Property Type Description
Cultures List
DefaultCulture Culture

Public Methods

Method Description
ExtractDomainPrefix ( Uri url ) : string

Extract culture from an url

GetCulture ( string userLanguages ) : Culture

Get culture type from user language

GetCulture ( Uri url, Culture &culture ) : bool

Get culture type from url

GetPrefix ( string lang ) : string

Get suffix from culture

SetDomainPrefix ( Uri url, string lang ) : string

Replace the suffix of an url

TryAddCultureChangedCookie ( ) : void

Protected Methods

Method Description
GetHttpHandler ( System.Web.Routing.RequestContext requestContext ) : IHttpHandler

Private Methods

Method Description
ShouldGuessCulture ( bool fromQuery ) : bool

Method Details

ExtractDomainPrefix() public static method

Extract culture from an url
public static ExtractDomainPrefix ( Uri url ) : string
url System.Uri the url
return string

GetCulture() public static method

Get culture type from user language
public static GetCulture ( string userLanguages ) : Culture
userLanguages string
return Culture

GetCulture() public static method

Get culture type from url
public static GetCulture ( Uri url, Culture &culture ) : bool
url System.Uri the url
culture Culture culture to be set
return bool

GetHttpHandler() protected method

protected GetHttpHandler ( System.Web.Routing.RequestContext requestContext ) : IHttpHandler
requestContext System.Web.Routing.RequestContext
return IHttpHandler

GetPrefix() public static method

Get suffix from culture
public static GetPrefix ( string lang ) : string
lang string the lang
return string

SetDomainPrefix() public static method

Replace the suffix of an url
public static SetDomainPrefix ( Uri url, string lang ) : string
url System.Uri the url
lang string the lang of the suffix
return string

TryAddCultureChangedCookie() public method

public TryAddCultureChangedCookie ( ) : void
return void

Property Details

Cultures public_oe static_oe property

public static List Cultures
return List

DefaultCulture public_oe static_oe property

public static Culture DefaultCulture
return Culture