Webiant Logo Webiant Logo
  1. No results found.

    Try your search with a different keyword or use * as a wildcard.

Default.cshtml

@model LanguageSelectorModel

@inject Nop.Core.IWebHelper webHelper

@if (Model.AvailableLanguages.Count > 1)
{
    
@{ var returnUrl = webHelper.GetRawUrl(Context.Request); if (Model.UseImages) {
    @foreach (var lang in Model.AvailableLanguages) {
  • @lang.Name
  • }
} else { var languages = await Model.AvailableLanguages.SelectAwait(async lang => new SelectListItem { Text = lang.Name, Value = Url.RouteUrl("ChangeLanguage", new { langid = lang.Id, returnUrl }, webHelper.GetCurrentRequestProtocol()), Selected = lang.Id.Equals(Model.CurrentLanguageId) }).ToListAsync(); } }
}