How can I create a language selection drop-down block?

Hello everyone, anyone knows how to make a drop-down block for customers to choose languages? I’m using Shopify translate and adapt but can’t find anywhere to do this. Or do I need to have some code?

1 Like

Are you saying you want to add switcher?

Yes, I guess so. It’s like a block drop down when a customer click in and they can choose the languages

Have you tried Transcy? I used this app and it super helpful for me, they have switcher feature and I can customize it to relate my brand. Their support service really active. Highly recommend it.

Thank you @woobo , I’ll try it.

Hi @Kogi013 , language and country switchers are part of your theme. Head to Online Store > Themes and Customize for your current theme. Different themes manage them in different ways, but if you are using a free Shopify theme like Dawn they can be turned on in any one of the Announcement Bar, the Header, or the Footer.

My theme didn’t support language switching (it had a static liquid template with 4 languages that were not actually available in our shop). I ended up writing a bit of code to solve that, works like a charm. I use a free cdn https://github.com/lipis/flag-icons to get the flag icons, but that takes a bit of juggling because the flag names don’t match the iso codes for the language. Anyway, here’s a snippet.

{% if section.settings.languages and localization.available_languages.size > 1 %}
  
  
    

      
        
        {{ localization.language.iso_code | upcase }}
        
      
      

        

          {% for lang in localization.available_languages %}
            - {{ lang.endonym_name }}
              
            
          {% endfor %}
        

      

    

  

  
{% endif %}