How can I show a certain word when the different language is selected?

harukajmickey
Shopify Partner
119 0 9

Hello I am using Dawn.

 

How do you show ’年’ on then register form when Japanese is selected and not show it when English is selected?

Thank you in advance!

 

<div class="Form-Item">
  <p class="Form-Item-Label">{{ 'customer.register.birthday' | t }}</p>
  <div class="form-birthday">
    <select class="form-select" id="RegisterForm-year" name="customer[tags][year]">
      <option value="year" disabled selected>{{ 'customer.register.year' | t }}</option>
      {% for i in (1951..2023) %}
        <option value="{{ i }}">{{ i }}</option>
      {% endfor %}
      {% for i in (1951..2023) %}
        <option value="{{ i }}">{{ i }}年</option>
      {% endfor %}
    </select>

 

スクリーンショット 2023-07-07 17.06.53.png

Reply 1 (1)

gr_trading
Shopify Partner
1802 143 189

Hi @harukajmickey 

 

You can create custom translation text and add its value to your option to assign the text in Japanese language and black for others.

 

Hope it's clear to you...

For any custom development WhatsApp or connect at Email ID: gr.trading15@gmail.com for quick consultation. | Shopify Free codes
To support Buy Me a Coffee