<link href="https://fonts.googleapis.com/icon?family=Material+Icons%7CMaterial+Icons+Outlined" rel="stylesheet">
<li class="nav-item dropdown active mt-2 mr-2">
<a href="#" class="nav-link dropdown-toggle" id="navbarDropdownMenuLink" data-toggle="dropdown">
<span class="material-icons-outlined" style="font-size:20px; vertical-align: bottom; color:white">
language
</span>
</a>
<div class="dropdown-menu" style="width:70px; min-width:70px;" aria-labelledby="navbarDropdownMenuLink">
{# German flag - from EN or FR pages #}
{% if attribute(menuLinksAndPhrases.menuLinksEn2De, targetPath) is defined %}
<a class="dropdown-item" href="{{ attribute(menuLinksAndPhrases.menuLinksEn2De, targetPath) }}">
<img src="/bundles/startplatzstyle/images/german_language.png" height="20px;" alt="Deutsch">
</a>
{% elseif attribute(menuLinksAndPhrases.menuLinksFr2De, targetPath) is defined %}
<a class="dropdown-item" href="{{ attribute(menuLinksAndPhrases.menuLinksFr2De, targetPath) }}">
<img src="/bundles/startplatzstyle/images/german_language.png" height="20px;" alt="Deutsch">
</a>
{% else %}
{# Fallback to German homepage if no translation exists #}
<a class="dropdown-item" href="/">
<img src="/bundles/startplatzstyle/images/german_language.png" height="20px;" alt="Deutsch">
</a>
{% endif %}
{# English flag - from DE or FR pages #}
{% if attribute(menuLinksAndPhrases.menuLinksDe2En, targetPath) is defined %}
<a class="dropdown-item" href="{{ attribute(menuLinksAndPhrases.menuLinksDe2En, targetPath) }}">
<img src="/bundles/startplatzstyle/images/english_language.png" height="20px;" alt="English">
</a>
{% elseif attribute(menuLinksAndPhrases.menuLinksFr2En, targetPath) is defined %}
<a class="dropdown-item" href="{{ attribute(menuLinksAndPhrases.menuLinksFr2En, targetPath) }}">
<img src="/bundles/startplatzstyle/images/english_language.png" height="20px;" alt="English">
</a>
{% else %}
{# Fallback to English homepage if no translation exists #}
<a class="dropdown-item" href="/en">
<img src="/bundles/startplatzstyle/images/english_language.png" height="20px;" alt="English">
</a>
{% endif %}
{# French flag - from DE or EN pages #}
{% if attribute(menuLinksAndPhrases.menuLinksDe2Fr, targetPath) is defined %}
<a class="dropdown-item" href="{{ attribute(menuLinksAndPhrases.menuLinksDe2Fr, targetPath) }}">
<img src="/bundles/startplatzstyle/images/french_language.png" height="20px;" alt="Français">
</a>
{% elseif attribute(menuLinksAndPhrases.menuLinksEn2Fr, targetPath) is defined %}
<a class="dropdown-item" href="{{ attribute(menuLinksAndPhrases.menuLinksEn2Fr, targetPath) }}">
<img src="/bundles/startplatzstyle/images/french_language.png" height="20px;" alt="Français">
</a>
{% else %}
{# Fallback to French homepage if no translation exists #}
<a class="dropdown-item" href="/fr/">
<img src="/bundles/startplatzstyle/images/french_language.png" height="20px;" alt="Français">
</a>
{% endif %}
</div>
</li>