custom/plugins/FuerstenbergPorzellan/src/Resources/views/storefront/layout/header/actions/language-widget.html.twig line 1

Open in your IDE?
  1. {% sw_extends '@Storefront/storefront/layout/header/actions/language-widget.html.twig' %}
  2. {% block layout_header_actions_language_widget_content %}
  3.                         {% set isoCode = page.header.activeLanguage.translationCode.code|lower|split('-') %}
  4.                         {# @deprecated tag:v6.5.0 - Remove else cases, to maintain correct split of isoCode #}
  5.                         {% set language = feature('v6.5.0.0') ? isoCode[0] : isoCode[1] %}
  6.                         {% set country = feature('v6.5.0.0') ? isoCode[1] : isoCode[0] %}
  7.                         <div class="languages-menu">
  8.                             
  9.                             {% block layout_header_actions_languages_widget_form_items %}
  10.                                 <div class="top-bar-list"
  11.                                     aria-labelledby="languagesDropdown-{{ position }}">
  12.                                     {% for language in  page.header.languages %}
  13.                                         <div class="top-bar-list-item{% if language.id is same as(page.header.activeLanguage.id) %} item-checked{% endif %}"
  14.                                              title="{{ language.translated.name }}">
  15.                                             {% block layout_header_actions_languages_widget_form_items_flag %}
  16.                                                 {% set isoCode = language.translationCode.code|lower|split('-') %}
  17.                                                 {# @deprecated tag:v6.5.0 - Remove else cases, to maintain correct split of isoCode #}
  18.                                                 {% set flagLanguage = feature('v6.5.0.0') ? isoCode[0] : isoCode[1] %}
  19.                                                 {% set flagCountry = feature('v6.5.0.0') ? isoCode[1] : isoCode[0] %}
  20.                                                 <label class="top-bar-list-label"
  21.                                                        for="{{ position }}-{{ language.id }}">
  22.                                                     <input id="{{ position }}-{{ language.id }}"
  23.                                                            class="top-bar-list-radio"
  24.                                                            value="{{ language.id }}"
  25.                                                            name="languageId"
  26.                                                            type="radio"
  27.                                                         {% if language.id is same as(page.header.activeLanguage.id) %} checked{% endif %}>
  28.                                                     {% if language.name|lower == "deutsch" %}
  29.                                                         DE
  30.                                                     {% elseif language.name|lower == "english" %}
  31.                                                         EN
  32.                                                     {% elseif language.name|lower == "französisch" %}
  33.                                                         FR
  34.                                                     {% else %}
  35.                                                         {{ language.name }}
  36.                                                     {% endif %}
  37.                                                     
  38.                                                 </label>
  39.                                             {% endblock %}
  40.                                         </div>
  41.                                     {% endfor %}
  42.                                 </div>
  43.                             {% endblock %}
  44.                         </div>
  45.                         <input name="redirectTo" type="hidden" value="{{ app.request.get('_route') }}"/>
  46.                         {% for key, value in app.request.attributes.get('_route_params') %}
  47.                             <input name="redirectParameters[{{ key }}]" type="hidden" value="{{ value }}">
  48.                         {% endfor %}
  49.                     {% endblock %}