Skip Navigation

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.

WordPress 6.7 has introduced a new issue that impact translations, please update WooCommerce and WPML to the latest versions before you report issues. More about this here - https://wpml.org/errata/php-error-wp-6-7-notice-function-_load_textdomain_just_in_time-was-called/
Sun Mon Tue Wed Thu Fri Sat
- - 9:00 – 18:00 9:00 – 18:00 9:00 – 18:00 9:00 – 18:00 9:00 – 18:00
- - - - - - -

Supporter timezone: America/Lima (GMT-05:00)

Tagged: 

This topic contains 0 replies, has 2 voices.

Last updated by Andreas W. 13 minutes ago.

Assisted by: Andreas W..

Author Posts
November 14, 2024 at 7:29 pm #16404296

claudeD-16

Background of the issue:
I have a plugin installed called 'WooCommerce Product Tabs (Free)' which provides extra-tabs on every product. I have 5 different tabs created in French, which translate correctly in English through WPML.

Symptoms:
The problem is that only the name of the tabs doesn't translate and I don't know why. I have translated every string related to that plugin I have found but to no avail, it still isn't working.

Questions:
Why aren't the tab names translating even though other strings are?
Is there a specific setting in WPML or the plugin that I might be missing for translating tab names?

November 14, 2024 at 8:54 pm #16405084

claudeD-16

I have had 3 different suggestions by Bobby, but in the end, result is the same:

1) I have added the line the Product_Tabs.php
2) I have reviewed the author's documentation
3) I have augmented the WP Memory Limit to 256M and Revised the Customs Fields Translation

Please advise if you want me to try anything else.

If you want to go into the WP dashboard, let me know how I can send you access data.

November 14, 2024 at 11:44 pm #16405337

Bobby
Supporter

Languages: English (English )

Timezone: America/Los_Angeles (GMT-08:00)

I would like to take a closer look, unfortunately, the previous access details were removed, I have re-enabled them.

Thank you!

November 18, 2024 at 12:22 pm #16414787

claudeD-16

I am still awaiting for a reply concerning my problem... I have entered details to access my site to look into it as of Bobby's request.... Let me know what's happening please!

Thank you.

November 18, 2024 at 7:11 pm #16416404

Bobby
Supporter

Languages: English (English )

Timezone: America/Los_Angeles (GMT-08:00)

Thank you for the access details, and your patience as our support is offline during the weekend.

The first credentials are not working for me and do not allow me to get past the security pop-up.

If you need to edit the credentials you can edit the previous private reply above and update me here.

November 19, 2024 at 7:18 pm #16421191

claudeD-16

The private message was deleted...

I only had time to see that the pw was wrong before it dissapeared...

[removed]
Hope that works.

November 19, 2024 at 11:07 pm #16421885

Bobby
Supporter

Languages: English (English )

Timezone: America/Los_Angeles (GMT-08:00)

I have re-enabled a new private response for us, it's required due to GDPR laws before we access your site.

Thank you!

November 22, 2024 at 12:15 pm #16433713

claudeD-16

Hi Bobby. I have answered the private data you needed. Please let me know how you are doing.... Thank you

November 22, 2024 at 4:21 pm #16434716

claudeD-16

Hi. I am still awaiting for a reply concerning this ticket...

Please let me know what is going on.

November 22, 2024 at 7:58 pm #16435208

Bobby
Supporter

Languages: English (English )

Timezone: America/Los_Angeles (GMT-08:00)

Thank you for updating the access details, they worked!

The Product Tabs were missing their translations under Products->Product Tabs.

You can see the steps recommended in this hidden link" rel="noopener" target="_blank">documentation by the plugin author:

- Go to Products -> Product Tabs
- Click on the + icon to add translation for each tab

Once this was finalized it worked well.

I have also created a screencast explaining in further detail and visually showcasing the steps:
hidden link

November 25, 2024 at 2:38 pm #16440422

claudeD-16

Thanks for your input Bobby. I have done the other tabs, but now it seemed to have reversed the problem.... The titles only show up in english. The inside of the tabs translate well, but the tab titles always remain in english. Any idea as to why?

Let me know please.

Thank you again.

November 26, 2024 at 9:08 am #16443366

Andreas W.
Supporter

Languages: English (English ) Spanish (Español ) German (Deutsch )

Timezone: America/Lima (GMT-05:00)

Hello,

Since Bobby is on vacation I would like to assist you with this issue, but the provided server protection details seem not longer to be valid. I can not access the login form.

The private reply form is enabled again, so that you can provide admin access to the site.

Best regards
Andreas

November 26, 2024 at 2:32 pm #16445571

Andreas W.
Supporter

Languages: English (English ) Spanish (Español ) German (Deutsch )

Timezone: America/Lima (GMT-05:00)

I do not see an issue in this example:
hidden link

Could you please name an example product that displays the issue?

November 26, 2024 at 2:41 pm #16445591

claudeD-16

Hi Andreas.

In the example you sent me, the problem is clearly visible at the bottom (see screenshot). If the product is in french or english, the tab titles are still only in english...

Screenshot 2024-11-26 at 9.36.00 AM.png
November 27, 2024 at 8:57 am #16448125

Andreas W.
Supporter

Languages: English (English ) Spanish (Español ) German (Deutsch )

Timezone: America/Lima (GMT-05:00)

Thank you for the clarification!

We do have the following workaround for this issue:

1) Go to WPML > Settings and set Product Tabs (woo_product_tab) as Not Translatable.

2) Delete the Tab translations in Product > Product tabs.

3) Open .../wp-content/plugins/woocommerce-product-tabs/src/Product_Tabs.php file.

4) Look for line 58.

5) Replace:

			$wpt_tabs[ $key ]['title']               = esc_attr( $prd->post_title );

With:

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

6) Enable " Look for strings while pages are rendered" at the bottom section of WPML > String Translation.

7) Visit the front-end for registering the new string. Then disable the option again.

8) Go to WPML > String Translation and translate the new string.

Take note, that we are in contact with Barn2 in order to achieve a partnership and solving the occuring issues between their plugins and WPML.