WIP: No results found string or template is not translating (WPML)

OS: Windows
Plugins: WPML, Woocommerce

The string I enter to be rendered when there are no results found in a woocommerce product query is not being translatable. Even when I create a template to render instead, which I translate with WPML, the translated template won’t be used.

Hi,

thank you for your report. I’ve added it to the internal bug report, and we will update the topic once the issue is solved.

Thank you,
Matej

Hey @Matej,

any updates on this? Also, implementing a “no results found” template currently displays only the original version, not the translated one.

Greetings

Hi @Hawei,

no updates on this yet. We have a task, but it’s still in progress.

Best regards,
Matej

1 Like

i have a small workaround,

add a shortcode for each string you want to translate and translate those inthe string translation.

my example code:

add_shortcode('kinekt_no_results', function () {
  return esc_html__(
    'No results found',
    'kinekt_error_page'
  );
});

I made sure to apply the template to each language in my site.

if you’ve done this this will result in the strings translated on the languages you want

i havent tested it but you might be able to render a translated bricks template inside of the shortcode