Skip Navigation

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

Problem:
The client is unable to see the shortcode as part of the translation in the translation page and has to update the shortcode in the translated language manually, questioning the compatibility of the Shortcode Element with WPML.

Solution:
1. We recommend registering page builder widgets with WPML in WPML -> Settings -> Custom XML Configuration.
2. For Elementor widgets, refer to the guide on how to register page builder widgets for translation.
3. To register a shortcode with WPML directly, see the documentation on language configuration files.
4. After registering, make a change in the content of the page or post containing the widget or shortcode to trigger a change in translation, then update the translation.
5. Search for the shortcode within the Advanced Translation Editor if it does not appear by default. For more details, visit how to translate shortcodes and custom HTML attributes with the Advanced Translation Editor.

If this solution doesn't look relevant, 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.

This topic contains 1 reply, has 2 voices.

Last updated by Waqas Bin Hasan 1 year, 9 months ago.

Assisted by: Waqas Bin Hasan.

Author Posts
September 14, 2023 at 2:12 am #14393035

ka-chuS

Whenever I made an update to the translation, I have to update the shortcode in the translated language manually. And I cannot see the shortcode as part of the translation in the translation page. Is the Shortcode Element not compatible with WPML?

Shortcode Element screenshot: hidden link

September 15, 2023 at 7:50 am #14401043

Waqas Bin Hasan
WPML Supporter since 05/2014

Languages: English (English )

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

Hi,

Thank you for contacting the support.

Generally this element should be compatible but there are chances that things change over the time (i.e. new updates and/or fixes).

To deal with this situation, you can register page builder widgets with WPML in WPML -> Settings -> Custom XML Configuration. For the Elementor's widgets, I'll advise to check this guide https://wpml.org/documentation/support/language-configuration-files/how-to-register-page-builder-widgets-for-translation/.

Alternatively, you can also register a shortcode with WPML directly in the custom XML config, please see https://wpml.org/documentation/support/language-configuration-files/#page-builder-content.

Once this is done, simply make a change in the content of the page/post having this widget and/or shortcode, to trigger a change in translation. And then update the translation. You should be able to see it in the translation editor, as well as, translate it.

Please note that a shortcode by default doesn't appear in the translation editor (like any other content), you can search for it within the Advanced Translation Editor. See https://wpml.org/faq/how-to-translate-urls-shortcodes-and-html-attributes-using-the-advanced-translation-editor/#how-can-i-translate-shortcodes-and-custom-html-attributes-with-the-advanced-translation-editor for details.

Hope this helps.

Regards.