Discuss and resolve questions on Liquid, JavaScript, themes, sales channels, and site speed enhancements.
On Alchemy theme, they have option to put language selector into the dropdown menu only. I dont know how to move it on the header. Can anyone help me with some code lines?
Hi,
- Find the Current Language Selector Code
Code example
<form action="/locale" method="post">
<select name="locale_code" id="locale_code">
{% for locale in shop.locales %}
<option value="{{ locale | escape }}">{{ locale_name }}</option>
{% endfor %}
</select>
</form>
- Copy the language selector code and paste at header.liquid where you want to appear
- Style it using CSS
CSS example
.header .language-selector {
display: inline-block;
margin-left: 15px; /* Adjust for spacing */
font-size: 14px; /* Adjust font size */
}
.header .language-selector select {
padding: 5px; /* Adjust padding */
border: 1px solid #ddd; /* Adjust border */
background-color: #fff; /* Adjust background */
color: #333; /* Adjust text color */
border-radius: 3px;
}
Starting a B2B store is a big undertaking that requires careful planning and execution. W...
By JasonH Sep 23, 2024By investing 30 minutes of your time, you can unlock the potential for increased sales,...
By Jacqui Sep 11, 2024We appreciate the diverse ways you participate in and engage with the Shopify Communi...
By JasonH Sep 9, 2024