mirror of
https://github.com/claunia/marechai.git
synced 2025-12-16 19:14:25 +00:00
Add localization
This commit is contained in:
16
Marechai/Pages/_Host.cshtml.cs
Normal file
16
Marechai/Pages/_Host.cshtml.cs
Normal file
@@ -0,0 +1,16 @@
|
||||
using System.Globalization;
|
||||
using Microsoft.AspNetCore.Localization;
|
||||
using Microsoft.AspNetCore.Mvc.RazorPages;
|
||||
|
||||
namespace Marechai.Pages
|
||||
{
|
||||
public class HostModel : PageModel
|
||||
{
|
||||
public void OnGet() => HttpContext.Response.Cookies.Append(CookieRequestCultureProvider.DefaultCookieName,
|
||||
CookieRequestCultureProvider.
|
||||
MakeCookieValue(new
|
||||
RequestCulture(CultureInfo.CurrentCulture,
|
||||
CultureInfo.
|
||||
CurrentUICulture)));
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user