Skip to content

Commit

Permalink
Use culture name instead of two code ISO
Browse files Browse the repository at this point in the history
  • Loading branch information
hishamco committed May 5, 2016
1 parent 70e2ac2 commit 601ae43
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions TagHelpers/LanguageSwitcherTagHelper.cs
Original file line number Diff line number Diff line change
Expand Up @@ -34,21 +34,21 @@ public override void Process(TagHelperContext context, TagHelperOutput output)
case DisplayMode.ImageAndText:
output.Content.AppendHtml(@"<ul class='nav navbar-nav navbar-right'>
<li class='dropdown'>
<a href='#' class='dropdown-toggle' data-toggle='dropdown' role='button' aria-haspopup='true' aria-expanded='false'><img src='/images/" + selectedCulture.TwoLetterISOLanguageName + ".png' /> " + selectedCulture.EnglishName + @"<span class='caret'></span></a>
<a href='#' class='dropdown-toggle' data-toggle='dropdown' role='button' aria-haspopup='true' aria-expanded='false'><img src='/images/" + selectedCulture.Name + ".png' /> " + selectedCulture.EnglishName + @"<span class='caret'></span></a>
<ul class='dropdown-menu'>");
foreach (var culture in cultures)
{
output.Content.AppendHtml($"<li><a href='#' onclick=\"useCookie('{culture.TwoLetterISOLanguageName}')\"><img src='/images/{culture.TwoLetterISOLanguageName}.png' /> {culture.EnglishName}</a></li>");
output.Content.AppendHtml($"<li><a href='#' onclick=\"useCookie('{culture.Name}')\"><img src='/images/{culture.Name}.png' /> {culture.EnglishName}</a></li>");
}
break;
case DisplayMode.Image:
output.Content.AppendHtml(@"<ul class='nav navbar-nav navbar-right'>
<li class='dropdown'>
<a href='#' class='dropdown-toggle' data-toggle='dropdown' role='button' aria-haspopup='true' aria-expanded='false'><img src='/images/" + selectedCulture.TwoLetterISOLanguageName + @".png' /> <span class='caret'></span></a>
<a href='#' class='dropdown-toggle' data-toggle='dropdown' role='button' aria-haspopup='true' aria-expanded='false'><img src='/images/" + selectedCulture.Name + @".png' /> <span class='caret'></span></a>
<ul class='dropdown-menu'>");
foreach (var culture in cultures)
{
output.Content.AppendHtml($"<li><a href='#' onclick=\"useCookie('{culture.TwoLetterISOLanguageName}')\"><img src='/images/{culture.TwoLetterISOLanguageName}.png' /></a></li>");
output.Content.AppendHtml($"<li><a href='#' onclick=\"useCookie('{culture.Name}')\"><img src='/images/{culture.Name}.png' /></a></li>");
}
break;
case DisplayMode.Text:
Expand All @@ -58,7 +58,7 @@ public override void Process(TagHelperContext context, TagHelperOutput output)
<ul class='dropdown-menu'>");
foreach (var culture in cultures)
{
output.Content.AppendHtml($"<li><a href='#' onclick=\"useCookie('{culture.TwoLetterISOLanguageName}')\">{culture.EnglishName}</a></li>");
output.Content.AppendHtml($"<li><a href='#' onclick=\"useCookie('{culture.Name}')\">{culture.EnglishName}</a></li>");
}
break;
}
Expand Down

0 comments on commit 601ae43

Please sign in to comment.