Skip to content

Commit

Permalink
Fix Content Culture Picker (#15681)
Browse files Browse the repository at this point in the history
Fix  #15673
  • Loading branch information
MikeAlhayek authored Apr 7, 2024
1 parent d036104 commit 2864582
Showing 1 changed file with 9 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -20,15 +20,17 @@
<div class="dropdown-menu" aria-labelledby="oc-culture-picker">
@foreach (var culture in supportedCultures)
{
if (culture.Name != Model.CurrentCulture.Name)
if (culture.Name == currentCulture.Name)
{
<a asp-route="RedirectToLocalizedContent"
asp-route-area="OrchardCore.ContentLocalization"
asp-route-targetCulture="@culture.Name"
asp-route-contentItemUrl="@Context.Request.Path.Value"
asp-route-queryStringValue="@Context.Request.QueryString.Value"
class="dropdown-item">@culture.NativeName</a>
continue;
}

<a asp-route="RedirectToLocalizedContent"
asp-route-area="OrchardCore.ContentLocalization"
asp-route-targetCulture="@culture.Name"
asp-route-contentItemUrl="@Context.Request.Path.Value"
asp-route-queryStringValue="@Context.Request.QueryString.Value"
class="dropdown-item">@culture.NativeName</a>
}
</div>
</li>

0 comments on commit 2864582

Please sign in to comment.