Re: Create a language selector in the header of the Alchemy theme.

Create a language selector in the header of the Alchemy theme.

minh007
New Member
10 0 0

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?

Reply 1 (1)

Small_Task_Help
Shopify Partner
830 27 75

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;
}

 

To Get Shopify Experts Help, E-mail - [email protected]
About Us - We are Shopify Expert Agency
At Google My Business - Ecommerce Small Task - Hire Shopify Developers Ahmedabad