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 thread is resolved. Here is a description of the problem and solution.

Problem:
wpbakery shortcode image id not translated
Solution:
Use the following XML and translate image with Media Translation.

<wpml-config>
    <shortcodes>
        <shortcode>
            <tag>jtl_image</tag>
            <attributes>
                <attribute type="link" encoding="vc_link">link</attribute>
                <attribute type="media-ids">image</attribute>
            </attributes>
        </shortcode>
    </shortcodes>
</wpml-config>

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

Tagged: 

This topic contains 5 replies, has 2 voices.

Last updated by corinnaH-2 1 month, 3 weeks ago.

Assigned support staff: Bruno Kos.

Author Posts
August 20, 2019 at 8:17 am #4421559

corinnaH-2

Hello WPML-Team,

I have a problem with the translation of the WPBakery shortcodes. All Custom shortcodes work so far, except for translating the Image ID. That works until a few weeks ago. Probably broke with an update. I use it as follows:

<shortcode>
<tag>custom_image</tag>
<attributes>
<attribute type="link" encoding="vc_link">link</attribute>
<attribute type="media-ids">image</attribute>
</attributes>
</shortcode>

the link translation will be recognized only the ID of the image will not be output. I have checked it several times, but find no mistake.

August 20, 2019 at 9:25 am #4422105

Bruno Kos
Supporter

Languages: English (English )

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

Ok, I will reply here form now on!

August 20, 2019 at 9:33 am #4422167

corinnaH-2

thanks for your help! maybe the 2nd tier can find the problem.

August 20, 2019 at 12:03 pm #4423363

Bruno Kos
Supporter

Languages: English (English )

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

Hi,

Can you tell me if you tried translating these images using Media Translation, while using this shortcode? Has this combination worked before? Because WPML does not allow translating numerical values, hence where the issue is coming from.

Regards,
Bruno Kos

August 20, 2019 at 12:22 pm #4423491

Bruno Kos
Supporter

Languages: English (English )

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

Hi,

See this:
hidden link

I translated it like this:
hidden link

With the following configuration:

<wpml-config>
    <shortcodes>
        <shortcode>
            <tag>jtl_image</tag>
            <attributes>
                <attribute type="link" encoding="vc_link">link</attribute>
                <attribute type="media-ids">image</attribute>
            </attributes>
        </shortcode>
    </shortcodes>
</wpml-config>

This is the only (and the proper) way to do this.

Regards,
Bruno Kos

August 26, 2019 at 1:20 pm #4459145

corinnaH-2

My issue is resolved now. Thank you!