Skip Navigation

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

Problem:
If you're noticing that a product is not translating correctly, even though it appears translated in the translation dashboard and edit mode, but still displays in English on the front end in all languages.
Solution:
We recommend following these steps:
1. Navigate to Products -> Product Tabs.
2. Change the language to your secondary languages.
3. Delete the translated tabs.
4. Empty the trash.
5. Go to WPML -> Settings -> Post Type Translation.
6. Set the 'woo_product_tab' as Not Translatable.
7. Edit the file .../wp-content/plugins/woocommerce-product-tabs/src/Product_Tabs.php.
8. On line 58, replace the existing code with the following workaround:

$wpt_tabs[ $key ]['title'] = esc_attr( $prd->post_title );<br />// WPML Workaround for compsupp-7241<br />if ( class_exists('Sitepress') ) {<br />    $string = $wpt_tabs[ $key ]['title'];<br />    $textdomain = 'WordPress';<br />    $string_name = 'WPML Workaround : '.substr($string, 0, 20);<br /><br />    $wpml_default_lang = apply_filters('wpml_default_language', NULL );<br />    $wpml_current_lang = apply_filters( 'wpml_current_language', NULL );<br /><br />    if ($wpml_default_lang == $wpml_current_lang ) {<br />        do_action( 'wpml_register_single_string', $textdomain, $string_name, $string );<br />    }<br />    // Apply the translation to the string<br />    $string = apply_filters('wpml_translate_single_string', $string , $textdomain, $string_name);<br /><br />    $wpt_tabs[ $key ]['title'] = $string;  // Replace the title<br />}

9. Visit the front end to register the new string.
10. Navigate to WPML > String Translation and translate the new string.

Please note that this solution might be outdated or not applicable to your case. If the issue persists, we highly recommend checking the related known issues, verifying the version of the permanent fix, and confirming that you have installed the latest versions of themes and plugins. If you still need assistance, please open a new support ticket.

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.

Our next available supporter will start replying to tickets in about 7.78 hours from now. Thank you for your understanding.

Tagged: 

This topic contains 17 replies, has 2 voices.

Last updated by Osama Mersal 8 months ago.

Assisted by: Osama Mersal.

Author Posts
March 5, 2024 at 11:06 am #15373943

dawoodH

Hello, I noticed that a product is not translating even though in the translation dashboard it shows it translated correctly as well as when you view it in edit mode.

This is the link to the product: hidden link

It just shows in English in every language.
Can you support me with this? Thank you!

March 5, 2024 at 11:21 am #15374054

Osama Mersal
Supporter

Languages: English (English ) Arabic (العربية )

Timezone: Africa/Cairo (GMT+02:00)

Hi,

Thanks for contacting WPML forums support. I'll be glad to help you today.

I would need to look closely at your site, so I would need to request temporary access (WP-Admin and FTP)
Preferably to a test site where the problem has been replicated.

Your answer will be private, meaning only you and I can access it.

❌ Please backup your database and website ❌

✙ I would need your permission to de-activate and re-activate the Plugins and the Theme and change configurations on the site. This is also a reason the backup is critical.

✙ I also need your permission to take a local copy of your site to debug the issue without affecting your live site.

Best regards,
Osama

March 5, 2024 at 11:46 am #15374255

Osama Mersal
Supporter

Languages: English (English ) Arabic (العربية )

Timezone: Africa/Cairo (GMT+02:00)

Hi,

Thanks for the access details. Please translate the tabs. (hidden link)

Best regards,
Osama

March 5, 2024 at 11:55 am #15374290

dawoodH

Hello, tabs are now translated 🙂

March 5, 2024 at 12:11 pm #15374372

Osama Mersal
Supporter

Languages: English (English ) Arabic (العربية )

Timezone: Africa/Cairo (GMT+02:00)

Hi,

Thanks for translating the tabs. After translating the tabs, you need to update the products in the default language and their translations.

Kindly check this product. (hidden link)

Best regards,
Osama

March 5, 2024 at 12:37 pm #15374514

dawoodH

Thanks, now the descriptions are translated but the titles of the tabs are not, how can I fix that?

March 5, 2024 at 12:54 pm #15374584

Osama Mersal
Supporter

Languages: English (English ) Arabic (العربية )

Timezone: Africa/Cairo (GMT+02:00)

Hi,

It seems like a compatibility issue. Please login to this sandbox site and install the Product Tabs plugin. (hidden link)

After that, please create three test tabs and translate them to replicate the issue. Please let me know if the problem is replicable so I can check with our compatibility team.

Best regards,
Osama

March 5, 2024 at 1:09 pm #15374656

dawoodH

Hi, I managed to install and create 3 tabs but I can't find the option on where to translate them :/

March 5, 2024 at 1:22 pm #15374689

Osama Mersal
Supporter

Languages: English (English ) Arabic (العربية )

Timezone: Africa/Cairo (GMT+02:00)

Hi,

I've set the tabs to be translatable from WPML-> Settings-> Post Type Translation section. Please translate the tabs to replicate the issue.

Best regards,
Osama

March 5, 2024 at 1:27 pm #15374694

dawoodH

Hi, thanks! I translated the German version and now on the product page it displays both english and german tabs, regardless of the language selected.

Screenshot 2024-03-05 152551.png
March 5, 2024 at 2:22 pm #15374983

Osama Mersal
Supporter

Languages: English (English ) Arabic (العربية )

Timezone: Africa/Cairo (GMT+02:00)

Hi,

Thanks for replicating the issue. I've consulted our compatibility team, and I'll update you as soon as I get their reply.

Best regards,
Osama

March 5, 2024 at 2:28 pm #15375009

dawoodH

Perfect thank you so much, let me know when you have updates! 🙂

March 5, 2024 at 2:30 pm #15375013

Osama Mersal
Supporter

Languages: English (English ) Arabic (العربية )

Timezone: Africa/Cairo (GMT+02:00)

Hi,

You are more than welcome! I will keep you updated as soon as I receive any new information.

Best regards,
Osama

March 11, 2024 at 10:28 am #15394141

dawoodH

Hello! Any updates on this?

March 11, 2024 at 11:13 am #15394439

Osama Mersal
Supporter

Languages: English (English ) Arabic (العربية )

Timezone: Africa/Cairo (GMT+02:00)

Hi,

Our compatibility team is debugging the issue, but I'm afraid I don't have an update yet.

Thanks for your patience.

Best regards,
Osama