Hi everyone!
I’m new here and in general on making websites. I’m making a shop with the prestige theme and tried to integrate the Language switcher from Translation Lab next to search icon. For the Desktop-view it functions perfectly, but for the mobile version the menu collapses, and the secondary navigation as well, so the Switcher disapears with it. I made a workaround and placed it in the sidebar menu, but I now am looking if somebody can help me keeping the Switcher from the desktop view on the mobile view as well. I don’t know where to change the code and which liquidcodes I should use.
This is the Language switcher that I wish to implement on the mobile view as well that at the moment looks like this:
And here is the workaround, but it is not optimal, as it isn’t visible without opening the sidemenu:
I have the following code in the header.liquid:
{%- comment -%}
CURRENCY AND LANGUAGE SELECTORS
{%- endcomment -%}
{%- if section.settings.show_country_selector and localization.available_countries.size > 1 -%}
{%- assign country_selector = true -%}
{%- endif -%}
{%- if section.settings.show_locale_selector and localization.available_languages.size > 1 -%}
{%- assign locale_selector = true -%}
{%- endif -%}
{%- if locale_selector or country_selector -%}
{%- capture localization_form -%}
{%- form ‘localization’, id: ‘localization_form_header’, class: ‘Header__LocalizationForm hidden-pocket hidden-lap’ -%}
{%- if locale_selector -%}
And here is the part of the secondary navigation:
-
{%- if shop.customer_accounts_enabled -%}
- {{- 'header.navigation.account' | t -}} {%- endif -%}
- {{ 'header.navigation.search' | t }}
- {{ 'header.navigation.cart' | t }} ({{ cart.item_count }})
{%- elsif localization_form != blank -%}
- {{ localization_form }}
{%- endunless -%}
{%- if shop.customer_accounts_enabled and section.settings.show_icons or use_sidebar_menu -%}
{%- render ‘icon’ with ‘account’ -%}
{%- endif -%}
<a href=“{{ routes.cart_url }}” class=“Header__Icon Icon-Wrapper Icon-Wrapper–clickable {% unless section.settings.show_icons or use_sidebar_menu %}hidden-desk{% endunless %}” {% if settings.cart_type == ‘drawer’ %}data-action=“open-drawer” data-drawer-id=“sidebar-cart” aria-expanded=“false” aria-label=“{{ ‘header.navigation.open_cart’ | t }}”{% endif %}>
{%- render ‘icon’ with ‘cart’ -%}
{%- render ‘icon’ with ‘cart-desktop’ -%}
Is there a easy way to display the Switcher on the mobile view as well? And would it have enough space between the search icon and the Logo?
Greetings
Tiago


