Table of Contents

Class CookieRequestCultureProvider

Namespace
Oqtane.Shared
Assembly
Oqtane.Shared.dll
public class CookieRequestCultureProvider
Inheritance
object
CookieRequestCultureProvider

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 RequestCulture

The 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 string

The cookie value to parse.

Returns

RequestCulture

The RequestCulture or null if parsing fails.