Class CookieRequestCultureProvider
public class CookieRequestCultureProvider
- Inheritance
-
objectCookieRequestCultureProvider
Fields
DefaultCookieName
Represent the default cookie name used to track the user's preferred culture information, which is ".AspNetCore.Culture".
public static readonly string DefaultCookieName
Field Value
- string
Properties
CookieName
The name of the cookie that contains the user's preferred culture information. Defaults to DefaultCookieName.
public string CookieName { get; set; }
Property Value
- string
Methods
MakeCookieValue(RequestCulture)
Creates a string representation of a RequestCulture for placement in a cookie.
public static string MakeCookieValue(RequestCulture requestCulture)
Parameters
requestCulture
RequestCultureThe RequestCulture.
Returns
- string
The cookie value.
ParseCookieValue(string)
Parses a RequestCulture from the specified cookie value.
Returns null
if parsing fails.
public static RequestCulture ParseCookieValue(string value)
Parameters
value
stringThe cookie value to parse.
Returns
- RequestCulture
The RequestCulture or
null
if parsing fails.