Discuss and resolve questions on Liquid, JavaScript, themes, sales channels, and site speed enhancements.
We're moving the community! Starting July 7, the current community will be read-only for approx. 2 weeks. You can browse content, but posting will be temporarily unavailable. Learn more
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;
}