Skip to content Skip to sidebar

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

Problem:
You are using custom shortcodes on your blog with a custom XML configuration to translate them. You've been using the

ignore-content="1"

attribute to prevent translation of the shortcode content, but this causes the translations not to update when changes are made to the source article's content. Removing the

ignore-content

attribute results in the translation of the content, which breaks the JSON content of the shortcode.
Solution:
Unfortunately, there is no way to set a shortcode to be copied without being translated directly. You can either avoid using any XML configuration, allowing the same shortcode to be used in the translation without alteration, or you can store the content in custom fields and set these fields to COPY. This approach ensures that the content is copied exactly without translation.

If this solution does not resolve your issue or seems outdated, we recommend checking the related known issues and verifying 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 4 replies, has 1 voice.

Last updated by Dražen 1 month, 2 weeks ago.

Assisted by: Dražen.

Author Posts
May 22, 2025 at 10:41 am #17060955

baptisteW-2

Background of the issue:
I am using a few custom shortcodes on my blog and have set up a custom XML configuration to translate them. I have been using ignore-content="1" to prevent translation of the shortcode content.

Symptoms:
When I use ignore-content="1", changes in the source article's content do not get copied to the translations, resulting in stale data. Removing ignore-content causes the content to be translated, which breaks the JSON content of the shortcode.

Questions:
Is there a way to copy the content of a shortcode but not translate it?

May 22, 2025 at 3:53 pm #17062898

baptisteW-2

Note: I could also move this content to an attribute, but I also need the guarantee that it will be copied and not translated.

May 26, 2025 at 8:53 am #17071853

Dražen
Supporter

Languages: English (English )

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

Hello,

thanks for waiting, I am afraid there is no way to set short code to be copied. What you can do is not use any XML and then same shortcode should be used also on translation, or set content in custom fields and then set those custom fields to COPY.

Hope this helps, let me know if any other doubts.

Regards,
Drazen

May 30, 2025 at 4:21 am #17090342

baptisteW-2

Hi

Thanks for the answer.

This does not really help since this means I will have to entirely change my shortcode. But I guess I have no choice but to work around these WPML limitations.

June 2, 2025 at 6:14 am #17096335

Dražen
Supporter

Languages: English (English )

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

Hello,

I am sorry to hear it does not help, but I am afraid that is how WPML work.

If there is anything else we can do for you or you have any other doubts feel free to contact us.

Regards,
Drazen