Skip to content Skip to sidebar

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

Problem:
If you're experiencing issues with some texts not being translated when switching to a specified language, even though all texts were translated using the WPML plugin, the problem might be related to the custom tabs Elementor element that is not WPML Translation Editor compatible.
Solution:
To resolve this issue, we recommend the following steps:
1. Add the following XML configuration to the WPML >> Settings > Custom XML Configuration section:

<wpml-config>
  <elementor-widgets>
    <widget name="tm-tabs">
      <fields-in-item items_of="items">
        <field type="Heading" editor_type="LINE">title</field>
        <field type="Content" editor_type="VISUAL">content</field>
        <field type="template_id" editor_type="LINE">template_id</field>
      </fields-in-item>
    </widget>
  </elementor-widgets>
</wpml-config>

2. Insert the following code into the functions.php file of your theme to make template IDs translatable using the Advanced Translation Editor:

add_filter( 'wpml_tm_job_field_is_translatable', '__return_true' );

3. Make a small change in the default language page, then open the secondary language page in the WPML Translation Editor and add the translated template IDs as a translation. This should display the translated content on the frontend.
For more details, you can refer to the following documentation:

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.

This topic contains 3 replies, has 2 voices.

Last updated by Noman 1 year, 8 months ago.

Assisted by: Noman.

Author Posts
December 13, 2023 at 11:55 am

deyaK

​Hello wpml ​team

I am facing a technical problem related to the translation
Although all texts and pieces were translated using the WPML plugin
However, some texts are not translated when switching to the specified language

The error appears on the attached page​

hidden link

December 13, 2023 at 12:49 pm
December 16, 2023 at 2:03 pm #15077425

deyaK

Hello, I have updated the add-ons as you asked me, but the same problem has not changed anything

December 17, 2023 at 2:18 pm #15079037

Noman
WPML Supporter since 06/2016

Languages: English (English )

Timezone: Asia/Karachi (GMT+05:00)

Sorry for the delay, it was my weekend (Friday-Saturday) and thanks for getting back to me. I’m debugging this issue on your site now and will get back to you with an update soon.

Thank you for your cooperation and patience

December 17, 2023 at 4:29 pm #15079205

Noman
WPML Supporter since 06/2016

Languages: English (English )

Timezone: Asia/Karachi (GMT+05:00)

I have noticed that the custom tabs Elementor element was using on the page that was not WPML Translation Editor compatible and I have followed the below steps in order to make it WPML Translation Editor compatible:

1. Added the below XML in WPML >> Settings > Custom XML Configuration section:

<wpml-config>
  <elementor-widgets>
    <widget name="tm-tabs">
      <fields-in-item items_of="items">
        <field type="Heading" editor_type="LINE">title</field>
        <field type="Content" editor_type="VISUAL">content</field>
        <field type="template_id" editor_type="LINE">template_id</field>
      </fields-in-item>
    </widget>
  </elementor-widgets>
</wpml-config>

2. Added a below code in the functions.php file of your theme to translate template ID’s using Advanced Trasnlation Editor:

add_filter( 'wpml_tm_job_field_is_translatable', '__return_true' ); 

3. Made a small change in the default language page and open up the secondary language page in WPML Translation Editor and added the translated template ids as a translation and now it shows the translated content at frontend. Could you please check and confirm?

Here are the docs for more details:
https://wpml.org/documentation/support/language-configuration-files/how-to-register-page-builder-widgets-for-translation/
https://wpml.org/documentation/support/language-configuration-files/translate-custom-shortcodes-with-wpml/#making-id-attributes-translatable

Please let me know if this resolves your issue or if you need further assistance with this issue.

Thank you

template id translation.png
section translated.png