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.

Sun Mon Tue Wed Thu Fri Sat
- 8:00 – 13:00 9:00 – 13:00 9:00 – 13:00 8:00 – 12:00 8:00 – 12:00 -
- 14:00 – 17:00 14:00 – 18:00 14:00 – 18:00 13:00 – 17:00 13:00 – 17:00 -

Supporter timezone: Europe/Zagreb (GMT+01:00)

Tagged: 

This topic contains 0 replies, has 0 voices.

Last updated by sigitaO 27 minutes ago.

Assisted by: Bruno Kos.

Author Posts
February 14, 2025 at 1:19 pm

sigitaO

Background of the issue:
I am trying to translate the tabs in my product pages, but they won't translate. You can see the issue on this page: hidden link

Symptoms:
No translation for some tabs.

Questions:
Why are the tabs not translating on my product pages?
How can I ensure the tabs are translated into the correct languages (LT, LV, DE, EST)?

February 14, 2025 at 2:07 pm
February 14, 2025 at 2:12 pm #16706788

Bruno Kos
Supporter

Languages: English (English ) German (Deutsch ) French (Français )

Timezone: Europe/Zagreb (GMT+01:00)

Can you please try the following:

1. Open the file: .../wp-content/plugins/woocommerce-product-tabs/src/Product_Tabs.php.
2. Find line 58 and 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
   }

3. Visit the front-end to register the new string.
4. Go to WPML > String Translation and translate the new string.

Does it work?

February 14, 2025 at 3:20 pm #16707057

sigitaO

Hello, thanks for the solution.
How can I access the page code?
Could you assist me in inputting it?

February 17, 2025 at 6:15 am #16711674

Bruno Kos
Supporter

Languages: English (English ) German (Deutsch ) French (Français )

Timezone: Europe/Zagreb (GMT+01:00)

To access the page code and make the necessary changes, you’ll need the following:

1. FTP Access:

You’ll need FTP (File Transfer Protocol) access to the website’s files. Please gather the following details from your hosting provider:

- Host/Server Address: (e.g., hidden link)
- Username: (provided by your hosting provider)
- Password: (provided by your hosting provider)
- Port: (usually 21 for FTP or 22 for SFTP)

You can use an FTP client like hidden link) to connect to your server.

2. Alternative: Hosting Control Panel (cPanel, Plesk, etc.)

If you don’t have FTP access, you can access the files through your hosting control panel. The steps generally look like this:

- Log in to your hosting provider's dashboard.
- Navigate to File Manager.
- Locate the following path:
`/wp-content/plugins/woocommerce-product-tabs/src/Product_Tabs.php`

3. Making the Change

- Open the file and locate line 58.
- Replace the existing code with the provided code.

After that, visit the front end of the site to register the new string and then go to WPML > String Translation to translate it.

Let me know if still having issues with this process!

February 18, 2025 at 10:38 pm #16721204

sigitaO

Thank you! I found the file. Do I paste that code only in line 60, in the highlighted box?

34234322423.png
February 19, 2025 at 7:56 am #16722475

Bruno Kos
Supporter

Languages: English (English ) German (Deutsch ) French (Français )

Timezone: Europe/Zagreb (GMT+01:00)

That's correct.

February 19, 2025 at 2:21 pm #16725154

sigitaO

Hello, I added the code and tried to translate the strings again but unfortunately it's not working

February 19, 2025 at 2:22 pm #16725160

sigitaO

I noticed that the tabs have now disappeared from the translated pages, but they're present in EN

February 19, 2025 at 2:39 pm #16725294

Bruno Kos
Supporter

Languages: English (English ) German (Deutsch ) French (Français )

Timezone: Europe/Zagreb (GMT+01:00)

Would you be willing to provide me with WordPress and FTP credentials so I could investigate the issue directly?

https://wpml.org/purchase/support-policy/privacy-and-security-when-providing-debug-information-for-support/

I marked your next reply as private so that you can safely add credentials.

February 19, 2025 at 3:24 pm
February 20, 2025 at 6:32 am #16727348

Bruno Kos
Supporter

Languages: English (English ) German (Deutsch ) French (Français )

Timezone: Europe/Zagreb (GMT+01:00)

I just noticed that you have blog license:
hidden link

That's why you don't have the latest updates of our plugins, because String Translation which is required for this to work is not included.

Can you go to https://wpml.org/account/ and upgrade the Blog license so we could update your plugins and continue checking this?

February 20, 2025 at 5:41 pm #16730937

sigitaO

I have been sent the client handoff link and I paid what was present in the link, which should've been Multilingual CMS, is it possible to change the subscription type?

February 20, 2025 at 5:44 pm #16730942

sigitaO

This is the conversation between the developer and WPML Support team, I paid the same amount indicated and I should receive the same functionalities. Is it possible to sort this out?

Screenshot 2025-02-20 174336.png