How can I change 'buy it now' to 'kupi' in Serbian?

Greeting

I was looking for an answer here,
but I didn’t find anything concrete..
I’m interested in how I can change “buy it now”

specifically to “kupi” in my language… it’s Serbian.

can it be solved at all?

Hi @Stefan221 , it’s Layoutbase here.

We would like to provide you with our thoughts on your question.

Since it is a dynamic button, we can only use Javascript to update it.

You can follow this code below:

  1. Go to Online Store->Theme->Edit code
  2. Layout/theme.liquid → paste below code before end tag

If you only have a language after that you can remove “html[lang=“sr”]” from the above.

If you have multiple languages after that you need to add multiple-line code like the example below:


Hope you find our suggestion helpful.

Best regards,

Layoutbase

Please let us know if you find it helpful by giving us a LIKE and Mark as Solution. Layoutbase is a leading Shopify page builder. Give us a try HERE!

1 Like

i did as it said but it won’t work… is everything done correctly?

Hi @Stefan221 ,

Your store is using lang=en instead of lang=“sr”
Please remove the above, and insert the code below.


Hope you find our suggestion helpful.

Best regards,

Layoutbase

now all working, thank you!

@Stefan221 Glad to hear that, best of luck for the rest of your page-building journey!

Hello

I have the same issue. The published language of my store is Arabic. and for the buy it now buttons I’m stuck translating it. what I should do and which piece of code I should use.

Hi @sameh_habib ,

Let me take a look at your code. Could you kindly share your Store URL?

Warm regards,

Layoutbase

https://tasuq-net.myshopify.com/admin/themes/134356861146?key=layout%2Ftheme.liquid

Hi @sameh_habib ,

Thank you, please give below a try:

  1. Go to Online Store->ThemeEdit code

  2. Locate Layouttheme.liquid → paste the code below before end tag:


Hope this will help, please let us know if you have further questions!

Best,

Layoutbase

Kindly check this. I decided to go with a dawn theme.

https://tasuq-net.myshopify.com/admin/themes/136508965082?key=layout%2Ftheme.liquid

and for the previeuse theme, Yes. it’s translated but when I change the size variente or the color it come again in english. But now on dawn theme it’s not and I expected to facing the same issue.

Hello,

I’m looking for a solution with similar problem in store with the Craft theme. The additional code for theme.liquid file breaks the code completely even that translates the button in bulgarian, so I had to delete it. I try adding different code in the Assets file global.js and also translates the button, but when I try to see options for products in a pop up, the button stays in english.

I attached a screenshot of the pop up with the products and another screenshot of the product page with translated button to check it out. The code I’m adding in the global.js file is below:

Code:

/* fix BUY IT NOW button to Bulgarian / / for desktop view / setTimeout(function(){ buyItNowButtonsCollection = document.getElementsByClassName(‘shopify-payment-button__button’); if(buyItNowButtonsCollection.length) { buyItNowButton = buyItNowButtonsCollection[0]; buyItNowButton.textContent = ‘Купете сега’; } }, 1000); / for mobile view */ setTimeout(function(){ buyItNowButtonsCollection = document.getElementsByClassName(‘shopify-payment-button__button–unbranded’); if(buyItNowButtonsCollection.length) { buyItNowButton = buyItNowButtonsCollection[0]; buyItNowButton.textContent = ‘Купете сега’; } }, 2000);

BR,
Sanya

Hello there, could you please give me advice, how to change it for czech language (kup teď)? I tried all codes over here, but it seems it doesn’t work :disappointed_face:

Im using DAWN theme 11
Thank you very much in advance