Use cookie everywhere

This commit is contained in:
hishamco
2020-12-03 17:15:08 +03:00
parent 049ded6f7e
commit 20f1a6175f
7 changed files with 9 additions and 50 deletions

View File

@ -1,17 +1,9 @@
@page "/"
@namespace Oqtane.Pages
@addTagHelper *, Microsoft.AspNetCore.Mvc.TagHelpers
@using System.Globalization
@using Microsoft.AspNetCore.Localization
@using Microsoft.Extensions.Configuration
@inject IConfiguration Configuration
@model Oqtane.Pages.HostModel
@{
// Set localization cookie
var localizationCookieValue = CookieRequestCultureProvider.MakeCookieValue(new RequestCulture(CultureInfo.CurrentCulture, CultureInfo.CurrentUICulture));
HttpContext.Response.Cookies.Append(CookieRequestCultureProvider.DefaultCookieName, localizationCookieValue);
}
<!DOCTYPE html>
<html>
<head>