Skip Navigation

This thread is resolved. Here is a description of the problem and solution.

Problem: I'm trying to translate the button "add to cart" in WooCommerce single product page. But can't find this in the strings menu or anywhere.

Solution: Go to WPML → String Translation area, check the Look for strings while pages are rendered option at the bottom of the page, refresh the page where the add to cart text is visible, go back and uncheck the Look for strings while pages are rendered option, and search again for the string in WPML → String Translation.

Relevant Documentation: https://wpml.org/documentation/getting-started-guide/string-translation/

This is the technical support forum for WPML - the multilingual WordPress plugin.

Everyone can read, but only WPML clients can post here. WPML team is replying on the forum 6 days per week, 22 hours per day.

This topic contains 13 replies, has 2 voices.

Last updated by Radu 9 months, 1 week ago.

Assigned support staff: Radu.

Author Posts
April 12, 2021 at 3:48 pm #8519213

gustavoF-11

I'm trying to translate button "add to cart" in woocommerce single product page. But can't find this in strings menu or anywhere.

Captura de pantalla 2021-04-12 a las 17.37.20.png
April 13, 2021 at 4:59 am #8521853

Radu
Supporter

Languages: English (English )

Timezone: Europe/Bucharest (GMT+02:00)

Hey Gustavo,

Can you look for this string in the WPML → String translation area, please? This is the place where you should be able to translate the add to cart text.

Also, please go to WPML → Theme and plugins localization, scan the WooCommerce plugin for strings, and go back to the WPML → String translation area. This time, the string that you're looking for should be available for translation.

Please give this a try and tell me how it goes.

Thanks,
Radu

April 13, 2021 at 7:49 am #8522525

gustavoF-11

Hi Radu,
I did this before open this ticket, I can provide login access to let you check this out.

Captura de pantalla 2021-04-13 a las 9.49.16.png
April 13, 2021 at 7:51 am #8522561

gustavoF-11

...apparently is already translated but it is with capital fonts the first character, something that I haven't done before in the strings...

Captura de pantalla 2021-04-13 a las 9.50.17.png
April 14, 2021 at 8:13 am #8531873

Radu
Supporter

Languages: English (English )

Timezone: Europe/Bucharest (GMT+02:00)

Hey Gustavo,

I just checked the Spanish:
hidden link

and Catalan:
hidden link

products, and I can see that the button text is different now (Añadir al carrito in Spanish and Afegeix a la cistella in Catalan). Can you tell me if this is what you wanted to do?

As for the text capitalization, this is the way that the Salient theme that you're using is changing it (using a CSS rule). You can easily overwrite it by adding this CSS to your website:

.single-product .single_add_to_cart_button {
    text-transform: none !important;
}

Thanks,
Radu

April 14, 2021 at 9:05 am #8532791

gustavoF-11

Hi Radu,
Thanks for your reply but this is not just about the "add to cart" button, it's about all other button related to woocommerce with the same issue. The first character in all words of all buttons, are written in capital, that can be fine in English, but not in other languages.

April 14, 2021 at 3:33 pm #8536891

Radu
Supporter

Languages: English (English )

Timezone: Europe/Bucharest (GMT+02:00)

Hey Gustavo,

Can you send me a link to the page where you have this issue and a screenshot with those elements too, please? As I mentioned in my previous message, this is not something that WPML does, it's a par that the Salient theme is controlling.
However, I can have a look and see if there's anything I can do to change this one.

Thanks,
Radu

April 19, 2021 at 11:59 am #8571973

gustavoF-11

Here a couple... in shop page there is an Spanish translation of product meta but another element of meta is not <hidden link;

...in product page the buttom is with capital fonts which is not right...
hidden link

Captura de pantalla 2021-04-19 a las 13.56.14.png
Captura de pantalla 2021-04-19 a las 13.55.59.png
April 20, 2021 at 12:26 pm #8581549

Radu
Supporter

Languages: English (English )

Timezone: Europe/Bucharest (GMT+02:00)

Hey Gustavo,

As I mentioned in my previous message, the fact that the first letter of each word is capitalized is a part that the Salient theme is controlling. I created some CSS rules that will help you with this change, but for further styling changes, you need to reach out to the theme authors:

.single_add_to_cart_button {
    text-transform: none !important;
}
.minimal.product .add_to_cart_button span {
    text-transform: none;
}

Thanks,
Radu

April 20, 2021 at 1:50 pm #8582359

gustavoF-11

I did and it works. Thanks!

But I still don't know how to do it with product meta in shop page. In my screenshot you will see that "Add to cart" is well translated but not the "Quick View" option.

Captura de pantalla 2021-04-20 a las 15.46.32.png
April 21, 2021 at 10:56 am #8589881

Radu
Supporter

Languages: English (English )

Timezone: Europe/Bucharest (GMT+02:00)

Hey Gustavo,

I set the next reply to be private so you can give me access to the dashboard area of the website. I'll check the Quick View text and see how can it be translated.

Thanks,
Radu

April 21, 2021 at 4:27 pm #8592843

Radu
Supporter

Languages: English (English )

Timezone: Europe/Bucharest (GMT+02:00)

Hey Gustavo,

Can you check the View Order text now, please? It should be translated this time. I just added the translation in WPML → String Translation area.

Thanks,
Radu

April 23, 2021 at 7:57 am #8607061

gustavoF-11

Hi Radu,
Thanks for your support. Now looks good bu I wonder why I just couldn't find that string in WPML?

April 25, 2021 at 5:13 am #8616637

Radu
Supporter

Languages: English (English )

Timezone: Europe/Bucharest (GMT+02:00)

Hey Gustavo,

What I did was to go to WPML → String Translation area, check the Look for strings while pages are rendered option at the bottom of the page, refreshed the page where the View Order text is available, go back and uncheck the Look for strings while pages are rendered option, and search again for the string in WPML → String Translation.

Since this is working fine now, I'll mark this ticket as resolved. If you have any other issue or question, feel free to open a new ticket and we'll take care of it in no time.

Thanks,
Radu