language selector doesn't appear in my header

Hello

I have a website in 2 languages and although having set up the Markets and enable the language selector - this doesn’t appear in my header as would do

https://the-body-shop-nordic.myshopify.com/

ubahdo

Hi @TBS2023 ,

This is Amelia from PageFly - a Landing Page Builder App

Here are some steps to troubleshoot and resolve this issue:

  1. Verify Theme Settings:

    • Go to Online Store > Themes > Customize.
    • Check the settings for the header section and ensure that the language selector is enabled.
  2. Check the Code:

    • Go to Online Store > Themes > Actions > Edit code.

    • In the Sections folder, open the header.liquid file.

    • Ensure that the code for the language selector is present. It might look something like this:

      {% if shop.locale_switcher_enabled %}
        <div class="locale-selector">
          {{ form | locale_form }}
        </div>
      {% endif %}
      
  3. Ensure Visibility with CSS:

    • Sometimes, the language selector might be present but hidden due to CSS styling. Add the following CSS to your theme.css or styles.css file to ensure it is visible:

      .locale-selector {
        display: block !important;
        visibility: visible !important;
      }
      
  4. Check Header Layout:

    • Make sure that the language selector has enough space in your header. Depending on the header layout or the number of elements in the header (e.g., logo, navigation, cart), the language selector might be hidden or pushed off the screen. You can inspect the header using your browser’s developer tools (right-click > Inspect) to see if the language selector is present in the HTML but hidden with CSS.
  5. Verify Markets Setup:

    • Double-check that both languages are activated for the relevant markets. Go to Settings > Markets and make sure that both languages are fully enabled for the appropriate regions. If any of them are inactive or misconfigured, this might prevent the language selector from appearing.

I hope that my solution works for you.

Best regards,

Amelia | PageFly