Added localization for /Home/AccessDenied

This commit is contained in:
2025-10-17 19:06:24 +02:00
parent 459d37eb99
commit bdbbd3e4d1
2 changed files with 34 additions and 4 deletions

View File

@@ -1,9 +1,14 @@
@using Microsoft.AspNetCore.Mvc.Localization
@inject IViewLocalizer T
@{
ViewData["Title"] = "Access denied";
ViewData["Title"] = T["Access denied"];
}
<div class="text-center">
<h1 class="display-4">Access denied</h1>
<p>You currently do not have permission to access the page you tried to access.</p>
<a href="/Home/Login">Please click here to return to the login page</a>
<h1 class="display-4">@T["Access denied"]</h1>
<p>@T["You currently do not have permission to access the page you tried to access."]</p>
@if (!User.Identity?.IsAuthenticated ?? false)
{
<a href="/Home/Login">@T["Please click here to return to the login page"]</a>
}
</div>