Skip Navigation

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

Problem:

You are experiencing difficulty translating texts and associating images with text in the banner box option of WPBakery using WPML.

Solution:

1. Ensure you have a custom language configuration for WPBakery elements in WPML. This involves adding specific XML configurations in WPML>>Settings>>Custom XML Configuration. For more details, refer to the documentation on building multilingual sites with WPBakery and WPML and registering page builder content for translation.
2. Add the following XML configuration to enable translation for the banner elements:

<wpml-config>
  <shortcodes>
    <shortcode>
      <tag>et_banner</tag>
      <attributes>
        <attribute>title</attribute>
        <attribute>subtitle</attribute>
        <attribute>image_id</attribute>
        <attribute type="link" encoding="vc_link">link</attribute>        
      </attributes>
    </shortcode>
  </shortcodes>
</wpml-config>

3. After updating the XML configuration, make a minor edit to the Homepage to refresh the translation settings, then update the translation. Remember to back up your site first and clear all caches after updating.
4. To translate the Image ID, add the following line to the functions.php file of your child theme:

add_filter( 'wpml_tm_job_field_is_translatable', '__return_true' );

Then, update the Homepage, translate the Image ID values with its French ID, and save the changes.

If this solution does not resolve your issue or seems outdated, we recommend checking related known issues at https://wpml.org/known-issues/, verifying the version of the permanent fix, and confirming that you have installed the latest versions of themes and plugins. If the problem persists, 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.

Tagged: 

This topic contains 2 replies, has 0 voices.

Last updated by pascalM-20 1 week, 6 days ago.

Assisted by: Bigul.

Author Posts
November 30, 2024 at 3:21 am #16461411

pascalM-20

Background of the issue:
I'm trying to translate texts in the banner box option of WPBakery on my site hidden link. I also tried to associate images with text in the translation. I know that you have a list of translatable items, but do you have an ETA on banners?

Symptoms:
Difficulty in translating texts and associating images with text in WPBakery using WPML.

Questions:
How can I translate texts in the banner box option of WPBakery? How do I associate images with text in the translation using WPML?

November 30, 2024 at 5:00 pm #16462151

Bigul
Supporter

Languages: English (English )

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

Hello,

Welcome to the WPML support forum. I will do my best to help you to resolve the issue.

To help you faster, I've enabled debug information for this support ticket. Please see this link for how to get this information from your site and give it to us: http://wpml.org/faq/provide-debug-information-faster-support/

When using custom WPBakery elements, a missing custom language configuration might cause the texts to not appear for translation (in WPML>>Settings>>Custom XML Configuration). This configuration needs to be added. Refer to the following links for more details. Please try and let us know your feedback.

https://wpml.org/documentation/plugins-compatibility/how-to-build-multilingual-sites-with-wpbakery-page-builder-and-wpml/

https://wpml.org/documentation/support/language-configuration-files/register-page-builder-content-for-translation/

--
Thanks!

Bigul

December 1, 2024 at 2:57 am #16462502

pascalM-20

Hello Bigul,
In one of the post you shared that I've already consulted, Banners is not yer in the list for WPBakery.

In the other posts, I tried to find a way with the video explaining for Elementor, but I was not able to find the custom field needed.

Thanks!

December 1, 2024 at 5:05 pm #16463494

Bigul
Supporter

Languages: English (English )

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

Hello,

Thank you for the updates. A couple of requests for tracking the issue.

1) Please share the URL of the page having the issue.

2) Please fill the private details fields after a full site backup. I would like to access the admin area of your site for further checking. Refer to the following links for more details about our private information sharing policies.

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

hidden link

--
Thanks!

Bigul

December 3, 2024 at 6:09 pm #16473303

Bigul
Supporter

Languages: English (English )

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

Hello,

Thank you for the details and login information. I have added language configuration for these fields in WPML>>Settings>>Custom XML Configuration - hidden link

<wpml-config>
  <shortcodes>
    <shortcode>
      <tag>et_banner</tag>
      <attributes>
        <attribute>title</attribute>
        <attribute>subtitle</attribute>
        <attribute>image_id</attribute>
        <attribute type="link" encoding="vc_link">link</attribute>        
      </attributes>
    </shortcode>
  </shortcodes>
</wpml-config>

So please update the Homepage (a minor edit in the contents to refresh the translation settings) after a site backup and then update the translation.

After that clear all types of caches and check whether the bug exists or not.

--
Thanks!

Bigul

December 4, 2024 at 2:09 am #16474169

pascalM-20

Hello Bigul,

Thanks for the update! I have made the steps you told me and I got everything translatable except the images. Since the image have text embed in the webp image I need to have two versions of the image, one in english and the other in french.

So when the website is in english, the english (default version) is loaded. But when the user opt for translated version in french that image needs to be replaced by the one in french. Is there a linecode missing in the XML?

I don't see where can I change the image in the translations

Thank you very much!

Screenshot 2024-12-03 210122.jpg
Screenshot 2024-12-03 210151.jpg
Screenshot 2024-12-01 160039.jpg
December 4, 2024 at 5:00 pm #16478191

Bigul
Supporter

Languages: English (English )

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

Hello,

Thank you for the updates. Have you translated those images from WPML>>Media Translation? Please refer to the following doc for more details.

https://wpml.org/documentation/getting-started-guide/media-translation/

If not, please try it after a site backup and let us know your feedback.

--
Thanks!

Bigul

December 4, 2024 at 8:07 pm #16478553

pascalM-20

Thanks!

On my first essay, I was trying to uploade the french version by switching the language on the header of wordpress. But now I have uploaded all the images from the media translation and do a complete cache purge. But the english image version still loads on the french pages.

I will try to delete them all and then re-upload them again, unless you have another solution?

Many thanks!

December 5, 2024 at 11:35 am #16481193

Bigul
Supporter

Languages: English (English )

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

Hello,

Thank you for the updates. Please create a page for testing with a couple of banners. Then translate those banner images from WPML>>Media Translation, and also translate the page. After that make sure you are getting the expected results or not.

--
Thanks!

Bigul

December 6, 2024 at 2:23 am #16484323

pascalM-20

Thanks again Bigul!

I've added a banner with 2 new images (english and french version)

I also create a new page from scratched also with the 2 new images

Purge cache and everything, but still only see the english version on the french side.

Best regards!

December 6, 2024 at 11:43 am #16485851

Bigul
Supporter

Languages: English (English )

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

Hello,

Please check the test page now. It is working as expected after following steps.

1) Add the following line of code in functions.php of your child theme. It will help us to translate the Image ID via Translation Editor.

add_filter( 'wpml_tm_job_field_is_translatable', '__return_true' );

2) Update the test page
3) Translate the Image ID values with its French ID
4) Save the changes

Please refer to the following documentation and attached images for more details.

https://wpml.org/documentation/support/language-configuration-files/translate-custom-shortcodes-with-wpml/#making-shortcodes-translatable

--
Thanks!

Bigul

2024-12-06_17h05_08.png
2024-12-06_17h04_40.png
2024-12-06_16h58_37.png
December 10, 2024 at 12:02 am #16495493
pascalM-20

Thank you very much Bigul! I am making progress all because of you 🙂

Where could I find the french image ID ? When I upload them via the media translator they don't appear in the media library since they are uploaded directly from my computer. Do I have to reuploaded them into the library?

New threads created by Bigul and linked to this one are listed below:

https://wpml.org/forums/topic/where-could-i-find-the-french-image-ids/

Screenshot 2024-12-09 190108.jpg
Screenshot 2024-12-09 185824.jpg
December 10, 2024 at 1:56 pm #16498568

Bigul
Supporter

Languages: English (English )

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

Hello,

Thank you for the feedback. I have added a new ticket for the easy follow-up of our discussion related to Media Translation. It will help us to avoid discussing multiple things in a single ticket. Thank you for your kind understanding.

--
Thanks!

Bigul

December 14, 2024 at 3:39 am #16512961

pascalM-20

Thanks to Bigul! He was a life saver!