Skip to content

Commit

Permalink
Fix Content Culture Picker
Browse files Browse the repository at this point in the history
Fix  #15673
  • Loading branch information
MikeAlhayek committed Apr 7, 2024
1 parent b6acaef commit 77b0225
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 77b0225

Please sign in to comment.