Merge pull request #1259 from hishamco/more-localization

Localize Page Template Module Titles
This commit is contained in:
Shaun Walker
2021-04-30 07:35:21 -04:00
committed by GitHub
3 changed files with 72 additions and 25 deletions

View File

@ -2,6 +2,7 @@
@inherits ModuleBase
@inject IPageService PageService
@inject IUserService UserService
@inject IStringLocalizer<SharedResources> Localizer
<div class="row">
@foreach (var p in _pages)
@ -11,7 +12,7 @@
string url = NavigateUrl(p.Path);
<div class="col-md-2 mx-auto text-center">
<NavLink class="nav-link" href="@url" Match="NavLinkMatch.All">
<h2><span class="@p.Icon" aria-hidden="true"></span></h2>@p.Name
<h2><span class="@p.Icon" aria-hidden="true"></span></h2>@Localizer[p.Name]
</NavLink>
</div>
}
@ -20,7 +21,7 @@
@code {
private List<Page> _pages;
public override SecurityAccessLevel SecurityAccessLevel => SecurityAccessLevel.Admin;
protected override void OnInitialized()