Skip Navigation

[Resolved] Toolset WooCommerce Blocks: “On Sale” Badge Translation Issue

This is the technical support forum for Toolset - a suite of plugins for developing WordPress sites without writing PHP.

Everyone can read this forum, but only Toolset clients can post in it. Toolset support works 6 days per week, 19 hours per day.

Sun Mon Tue Wed Thu Fri Sat
- 10:00 – 13:00 10:00 – 13:00 10:00 – 13:00 10:00 – 13:00 10:00 – 13:00 -
- 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 -

Supporter timezone: Asia/Kolkata (GMT+05:30)

This topic contains 6 replies, has 1 voice.

Last updated by Miguel 1 month, 3 weeks ago.

Assisted by: Minesh.

Author
Posts
#2811657
badge en ingles.jpg

Tell us what you are trying to do?
I'm setting up the shop page for WooCommerce using Toolset WooCommerce Blocks.

When I use the Product Image block, it allows me to customize it and enable the "Display On Sale Badge" option.

The problem I'm encountering is that, although it works and displays the badge, it shows it in English even though my entire site is in Spanish.

I tried deactivating all Toolset plugins, and in native WooCommerce, it appears in Spanish.

I tried with Loco Translate, and I couldn't find where to translate the strings for Toolset WooCommerce Blocks.

Is there any documentation that you are following?
yes, yours

Is there a similar example that we can see?

What is the link to your site?

aspiring-radar.localsite.io
user:
cacatua

pass
picorto77

#2811704

Minesh
Supporter

Languages: English (English )

Timezone: Asia/Kolkata (GMT+05:30)

Hello. Thank you for contacting the Toolset support.

Can you please share problem URL where exactly on what page and what section I can see the "On Sale" badge and send me admin access details.

*** Please make a FULL BACKUP of your database and website.***
I would also eventually need to request temporary access (WP-Admin and FTP) to your site. Preferably to a test site where the problem has been replicated if possible in order to be of better help and check if some configurations might need to be changed.

I have set the next reply to private which means only you and I have access to it.

#2811751

Minesh
Supporter

Languages: English (English )

Timezone: Asia/Kolkata (GMT+05:30)

When I try to access the wp-admin or the problem URL you shared it shows 404 page.

Can you please send me working site so that I can login to admin and access the problem URL you shared.

#2811783

I'm working on the website using Local by Flywheel and plan to publish it today. Once it's live, I'll send you the access details.

thanks for your patience!

#2811903

Minesh
Supporter

Languages: English (English )

Timezone: Asia/Kolkata (GMT+05:30)

Ok fine - please get in touch when you have everything working.

#2811960

Hi Minesh!

The website is online:
eulalialatorre.cl

It's in spanish.

your credentials are the same I sent to you yesterday.

#2812029

Minesh
Supporter

Languages: English (English )

Timezone: Asia/Kolkata (GMT+05:30)

I do not have much exposer with loco translate but I've added the following code to "Custom Code" section offered by Toolset with the code snippet namely "toolset-custom-code":
=> hidden link

add_filter('gettext', function($translated_text, $untranslated_text, $domain){
  
   if($untranslated_text == 'Sale!' && $domain == 'woocommerce_views'){
        $translated_text = 'OFERTA';
    }
    return $translated_text;
}, 10, 3);

You can adjust the text as required.

I can see now translated text with the sale badge:
- hidden link

#2812741

Thanks again Minesh!

It worked perfectly.

regards

yo