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.
This topic contains 17 replies, has 2 voices.
Last updated by 8 months ago.
Assisted by: Osama Mersal.