All files / src/app/shell/header/language-switch language-switch.component.html

100% Statements 1/1
100% Branches 0/0
100% Functions 0/0
100% Lines 1/1

Press n or j to go to the next uncovered block, b, p or k for the previous block.

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 442x                                                                                      
<!-- keep-localization-pattern: ^locale\..*\.(long|short)$ -->
@if (locale$ | async; as locale) {
  <div class="language-switch" ngbDropdown placement="{{ placement === 'up' ? 'top-right' : 'bottom-right' }}">
    <button
      aria-haspopup="menu"
      class="language-switch-button btn btn-link"
      ngbDropdownToggle
      type="button"
      [attr.aria-label]="('language_switch.label' | translate) + ('locale.' + locale + '.long' | translate)"
    >
      <span class="sticky-header-icon">
        <i class="bi bi-globe-americas header-icon mb-1"></i>
      </span>
      <span class="language-switch-current-selection d-inline"
        >{{ 'locale.' + locale + (deviceType === 'mobile' ? '.short' : '.long') | translate
        }}<span class="switch_arrow"></span
      ></span>
    </button>
    <div class="language-switch-container dropdown-menu" ngbDropdownMenu role="menu" style="left: 0 !important">
      <div class="language-switch-menu-container">
        @if (availableLocales$ | async; as availableLocales) {
          @if (availableLocales.length) {
            <ul>
              @for (l of availableLocales; track l) {
                @if (l !== locale) {
                  <li>
                    <a
                      [href]="location | ishMakeHref: { lang: l } | async"
                      [lang]="'locale.' + l + '.short' | translate"
                      (click)="setLocaleCookie(l)"
                    >
                      {{ 'locale.' + l + '.long' | translate }}
                    </a>
                  </li>
                }
              }
            </ul>
          }
        }
      </div>
    </div>
  </div>
}