Color swatches/variants in forgien language

Color swatches/variants in forgien language

AlonElbaz
Tourist
8 0 7

so basicly when you get into one of my products and if u will check the color options

you will see that 

AlonElbaz_0-1621281949030.png

my site is in non - english language and i want to translate it [hebrew] but when i do change it the color not behing recognized like that:

1.jpg

"צבע" = Color in hebrew so i want it to be recognized 

so i did a little digging in the internet and search a few sources that indicate that this is the source at edit code > snippets > collection-swatch.liquid

 

{% if settings.collection_swatches %}
  {% assign file_extension = 'png' %}

  {% for option in product.options %}
    {% assign downcased_option = option | downcase %}
    {% if downcased_option contains 'color' or downcased_option contains 'colour' %}
      {% assign option_index = forloop.index0 %}
      {% assign values = '' %}
      <div class="collection_swatches">

        {% for variant in product.variants %}
          {% assign value = variant.options[option_index] %}
          {% unless values contains value %}
            {% assign values = values | join: ',' %}
            {% assign values = values | append: ',' | append: value %}
            {% assign values = values | split: ',' %}

            <a href="{{ variant.url | within: collection }}" class="swatch" data-swatch-name="meta-{{ downcased_option }}_{{ value | replace: ' ', '_' | downcase }}">
              <span {% if section.settings.products_per_row == 2 %}
                      data-image="{{ variant.featured_image | product_img_url: '600x' }}"
                    {% elsif section.settings.products_per_row == 3 %}
                      data-image="{{ variant.featured_image | product_img_url: '500x' }}"
                    {% else %}
                      data-image="{{ variant.featured_image | product_img_url: '400x' }}"
                    {% endif %}
                    style="background-image: url({{ value | handle | append: '.' | append: file_extension | asset_img_url: '50x' | prepend: 'https:' }}); background-color: {{ value | split: ' ' | last | handle }};">
                </span>
            </a>
          {% endunless %}
        {% endfor %}

      </div>
    {% endif %}
  {% endfor %}
{% endif %}

 

 

but i dont know how to define the hebrew as well so the "צבע" will be = "color"

 

thoughts?

 

Replies 16 (16)

KetanKumar
Shopify Partner
36927 3642 11995

@AlonElbaz 

Sorry for facing this issue, it's my pleasure to help us.

Welcome to the Shopify community!
and Thanks for your Good question. 😊

Please share your site URL,
So I will check and provide a solution here.

If helpful then please Like and Accept Solution.
Want to modify or custom changes on store Hire me.
- Feel free to contact me on bamaniyaketan.sky@gmail.com regarding any help
Shopify Partner | Skype : bamaniya.sky
PSD to Shopify | Shopify Design Changes | Shopify Custom Theme Development and Desing | Custom Modifications In to Shopify Theme | SEO & Digital Marketing
AlonElbaz
Tourist
8 0 7

Hey thank you i will add a link right away:

https://dynamic-outdoors.com/products/andersonbag

Also if u can recommand a good place to learn css from , that also will be great

Thank you for your time sir

KetanKumar
Shopify Partner
36927 3642 11995

@AlonElbaz 

thanks are you upload custom translate color text on your app?

If helpful then please Like and Accept Solution.
Want to modify or custom changes on store Hire me.
- Feel free to contact me on bamaniyaketan.sky@gmail.com regarding any help
Shopify Partner | Skype : bamaniya.sky
PSD to Shopify | Shopify Design Changes | Shopify Custom Theme Development and Desing | Custom Modifications In to Shopify Theme | SEO & Digital Marketing
AlonElbaz
Tourist
8 0 7

For now all the color "red , green , blue , navy" is only on the english language

FIrst i want to manage to translate the "color" to "צבע" and if it will work ill think about changing each color (also not sure how to do that)

This is an example of the hebrew color text with the hebrew color name

https://dynamic-outdoors.com/collections/frontpage/products/spencerbackpack

KetanKumar
Shopify Partner
36927 3642 11995

@AlonElbaz 

oh sorry

let me know which app do you have used to translation?

If helpful then please Like and Accept Solution.
Want to modify or custom changes on store Hire me.
- Feel free to contact me on bamaniyaketan.sky@gmail.com regarding any help
Shopify Partner | Skype : bamaniya.sky
PSD to Shopify | Shopify Design Changes | Shopify Custom Theme Development and Desing | Custom Modifications In to Shopify Theme | SEO & Digital Marketing
AlonElbaz
Tourist
8 0 7

Hey i have an app that called rtl master that make alot of thing right to left

I dont have any translation app all is translated via the theme themplete in the edit language

KetanKumar
Shopify Partner
36927 3642 11995

@AlonElbaz 

oh i ssee may check theme setting edit language

If helpful then please Like and Accept Solution.
Want to modify or custom changes on store Hire me.
- Feel free to contact me on bamaniyaketan.sky@gmail.com regarding any help
Shopify Partner | Skype : bamaniya.sky
PSD to Shopify | Shopify Design Changes | Shopify Custom Theme Development and Desing | Custom Modifications In to Shopify Theme | SEO & Digital Marketing
AlonElbaz
Tourist
8 0 7

Hey what do i need to check there?

I can edit the language in the product page but its not responding because the code himself doesnt recognize hebrew i think its in the code i sent 

Am i wrong? 

And if i am wrong can u explain what should i check in the edit lang?

KetanKumar
Shopify Partner
36927 3642 11995

@AlonElbaz 

yes you're current way

edit the language

If helpful then please Like and Accept Solution.
Want to modify or custom changes on store Hire me.
- Feel free to contact me on bamaniyaketan.sky@gmail.com regarding any help
Shopify Partner | Skype : bamaniya.sky
PSD to Shopify | Shopify Design Changes | Shopify Custom Theme Development and Desing | Custom Modifications In to Shopify Theme | SEO & Digital Marketing
AlonElbaz
Tourist
8 0 7

I know how to change how its called but i need the "צבע" to be recognize the same value as color and when i change the text to "צבע" it will recognize the color

In the edit lang i dont have an option

In the edit code i have but i dont know how..

Which code i need to make so the "צבע" will show colors like the value "color" 

Did u get what i mean rn?

KetanKumar
Shopify Partner
36927 3642 11995

@AlonElbaz 

its product variant name can you please check on product admin side 

If helpful then please Like and Accept Solution.
Want to modify or custom changes on store Hire me.
- Feel free to contact me on bamaniyaketan.sky@gmail.com regarding any help
Shopify Partner | Skype : bamaniya.sky
PSD to Shopify | Shopify Design Changes | Shopify Custom Theme Development and Desing | Custom Modifications In to Shopify Theme | SEO & Digital Marketing
AlonElbaz
Tourist
8 0 7

@KetanKumar 

To change it its easy but as i said if i will change "color" to "צבע" the hebrew version the color will wont be displayed as it should...

Screenshot_20210519-143537_Chrome.jpg

 

if i change it to hebrew text the colors nor recognized...

Its not the problem to change the text i know how to do that..

I dont know how to make it work with hebrew text 

Screenshot_20210519-143700_Chrome.jpg

 you see when i keep color option as color the colors will display as they should

But when i change that to "צבע" which is the hebrew version of "color" shopify cant recognize the same value as "color" and i want to change that...

I really tried to explain that now i hope you get the problem 

KetanKumar
Shopify Partner
36927 3642 11995

@AlonElbaz 

oh i see it theme something is missing issue can you please contact theme support team or shopify support team 

If helpful then please Like and Accept Solution.
Want to modify or custom changes on store Hire me.
- Feel free to contact me on bamaniyaketan.sky@gmail.com regarding any help
Shopify Partner | Skype : bamaniya.sky
PSD to Shopify | Shopify Design Changes | Shopify Custom Theme Development and Desing | Custom Modifications In to Shopify Theme | SEO & Digital Marketing
AlonElbaz
Tourist
8 0 7

i still want to see if someone else know how to fix it because its to much money for this little task

KetanKumar
Shopify Partner
36927 3642 11995

@AlonElbaz 

oh sorry for this 

may you have contact your theme supporter?

If helpful then please Like and Accept Solution.
Want to modify or custom changes on store Hire me.
- Feel free to contact me on bamaniyaketan.sky@gmail.com regarding any help
Shopify Partner | Skype : bamaniya.sky
PSD to Shopify | Shopify Design Changes | Shopify Custom Theme Development and Desing | Custom Modifications In to Shopify Theme | SEO & Digital Marketing
roeeaizman
New Member
7 0 0

Hey @AlonElbaz Have you managed to fix this?

I would like to understand how?

+972542345222

Can u WhatsApp me?