{{/* Link directly to documentation etc., if possible. */ -}}
{{ $langPage := cond (gt (len .Translations) 0) . .Site.Home -}}
<div class="dropdown">
  <a class="nav-link dropdown-toggle" href="#" role="button" data-bs-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
    {{- $langPage.Language.LanguageName -}}
  </a>
  <ul class="dropdown-menu">
    {{ range $langPage.Translations -}}
    <li><a class="dropdown-item" href="{{ .RelPermalink }}">{{ .Language.LanguageName }}</a></li>
    {{ end -}}
  </ul>
</div>