title: Language switcher with bootstrap
body: <p>I am trying to build a language switcher inside the navbar.</p>
  
  <p>My code is the following (in <code>_LoginPartial.cshtml</code>)</p>
  
  <pre><code>using ( Html.BeginForm( "SetCulture", "Home", FormMethod.Post ) ) {
      @Html.AntiForgeryToken()
      &lt;ul class="nav navbar-nav navbar-right"&gt;
          &lt;li class="dropdown"&gt;
              &lt;a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-expanded="false"&gt;
                  &lt;img src="@selectedImgSrc" alt="@culture" /&gt;
                  &lt;span class="caret"&gt;&lt;/span&gt;
              &lt;/a&gt;
              &lt;ul class="dropdown-menu" role="menu"&gt;
                  &lt;li role="presentation"&gt;&lt;a href="#" class="language" rel="it-IT"&gt;&lt;img src="~/assets/images/i18n/it-IT.png" alt="Italiano" /&gt;&lt;/a&gt;&lt;/li&gt;
                  &lt;li role="presentation"&gt;&lt;a href="#" class="language" rel="en-US"&gt;&lt;img src="~/assets/images/i18n/en-US.png" alt="English" /&gt;&lt;/a&gt;&lt;/li&gt;
              &lt;/ul&gt;
          &lt;/li&gt;
      &lt;/ul&gt;
  }
  &lt;ul class="nav navbar-nav navbar-right"&gt;
      &lt;li&gt;@Html.ActionLink( "Register", "Register", "Account", routeValues: null, htmlAttributes: new { id = "registerLink" } )&lt;/li&gt;
      &lt;li&gt;@Html.ActionLink( "Sign in", "Login", "Account", routeValues: null, htmlAttributes: new { id = "loginLink" } )&lt;/li&gt;
  &lt;/ul&gt;
  </code></pre>
  
  <p><code>@selectedImgSrc</code> value is <code>~/assets/images/i18n/en-US.png</code></p>
  
  <p><code>@culture value</code> is <code>en-us</code></p>
  
  <p>However this code produce the following result</p>
  
  <p><img src="https://i.stack.imgur.com/PBPg0.png" alt="Bootstrap language switcher"></p>
  
  <p>Which has a couple of problems:</p>
  
  <ul>
  <li>On the nav the image is not showed but only the text (en-US)</li>
  <li>The dropdown is too large and I dont like it. Is there any way to make it smaller?</li>
  </ul>