<div dropdown
     class="btn-group"
     *ngIf="isDropdown">
  <a dropdownToggle
     class="dropdown-toggle"
     data-toggle="dropdown"
     i18n-title
     title="Select a Language">
    {{ supportedLanguages[selectedLanguage] }}
  </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 custom-select">
  <option *ngFor="let lang of supportedLanguages | keyvalue"
          [value]="lang.key">{{ lang.value }}</option>
</select>
