<div dropdown
     *ngIf="isDropdown">
  <a dropdownToggle
     class="dropdown-toggle"
     data-toggle="dropdown"
     i18n-title
     title="Select a Language">
    {{ supportedLanguages[selectedLanguage] }}
    <span class="caret"></span>
  </a>
  <ul *dropdownMenu
      class="dropdown-menu dropdown-menu-right">
    <li *ngFor="let lang of supportedLanguages | keyvalue">
      <a class="dropdown-item"
         (click)="changeLanguage(lang.key)">{{ lang.value }}</a>
    </li>
  </ul>
</div>

<select *ngIf="!isDropdown"
        (change)="changeLanguage($event.target.value)"
        [(ngModel)]="selectedLanguage"
        class="form-control">
  <option *ngFor="let lang of supportedLanguages | keyvalue"
          [value]="lang.key">{{ lang.value }}</option>
</select>
