Skip Navigation

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

Problem:
The client was unable to translate the Dynamic Tags section of an Icon List in WPML when using Elementor.
Solution:
We provided a workaround involving a code change:
1. Navigate to the

~/wp-content/plugins/sitepress-multilingual-cms/addons/wpml-page-builders/classes/Integrations/Elementor/DynamicContent/Strings.php

file.
2. Locate the code snippet around line 19 and replace it with the updated code:

const TRANSLATABLE_SETTINGS = [
	'before',
	'after',
	'fallback',
	'video_url',
	'shortcode'
];

3. Update the page in the default language and then update its translation.

Please note that this solution may become outdated or may not apply to your specific case. If the issue persists, we recommend checking the related known issues, verifying the version of the permanent fix, and confirming that you have installed the latest versions of themes and plugins. If you still need assistance, 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 13 replies, has 2 voices.

Last updated by Osama Mersal 1 year, 5 months ago.

Assisted by: Osama Mersal.

Author Posts
January 24, 2024 at 11:27 am

Daren

I have a simple ICON LIST that works well and is translatable in WPML. The problem is when I add a new item to the list using the DYNAMIC TAGS feature. The feature works but i cannot translate the DYNAMIC TAG section only. Everything else appears just fine.

Page is question is here:
hidden link

January 24, 2024 at 12:05 pm
January 24, 2024 at 12:07 pm #15221595

Osama Mersal
WPML Supporter since 02/2020

Languages: English (English ) Arabic (العربية )

Timezone: Africa/Cairo (GMT+03:00)

Hi,

Please login to this sandbox site and try to replicate the issue. (hidden link)

If the issue is replicable, please let me know how to reproduce it to consult our compatibility team.

Best regards,
Osama

January 24, 2024 at 12:43 pm #15221728

Daren

Created a simple icon list in a new page called "Icon List Test"
Problem persists here as well.

Items 1, 2, and 4 are simple text entries which can be translated easily.

Item 3 is a shortcode dynamic tag and does NOT appear properly in the translation section.

January 24, 2024 at 1:50 pm #15222127

Osama Mersal
WPML Supporter since 02/2020

Languages: English (English ) Arabic (العربية )

Timezone: Africa/Cairo (GMT+03:00)

Hi,

Thanks for replicating the issue. I've consulted our compatibility team, and I'll update you as soon as I get their reply.

Best regards,
Osama

January 25, 2024 at 2:36 am #15224406

Daren

From ELEMENTOR:

Hi Daren,

Thank you for your reply.

In this case, we suggest you report this issue to the plugin authors and If they need help from us, they can open an issue on our Github account, and our developers will be happy to assist.

January 25, 2024 at 2:37 am #15224407

Daren

hidden link

January 25, 2024 at 9:43 am #15225285

Osama Mersal
WPML Supporter since 02/2020

Languages: English (English ) Arabic (العربية )

Timezone: Africa/Cairo (GMT+03:00)

Hi,

Thanks for your update. I'll pass this reply on to our compatibility team.

Best regards,
Osama

January 28, 2024 at 10:39 am #15233963

Osama Mersal
WPML Supporter since 02/2020

Languages: English (English ) Arabic (العربية )

Timezone: Africa/Cairo (GMT+03:00)

Hi,

Thanks for your patience. Our compatibility team has found a workaround for the issue. Please check the following steps:

1- Open the (~/wp-content/plugins/sitepress-multilingual-cms/addons/wpml-page-builders/classes/Integrations/Elementor/DynamicContent/Strings.php) file
2- Replace the following snippet around line 19:

const TRANSLATABLE_SETTINGS = [
	'before',
	'after',
	'fallback',
	'video_url',
];

With

const TRANSLATABLE_SETTINGS = [
		'before',
		'after',
		'fallback',
		'video_url',
		'shortcode'
];

3- Update the page in the default language and update its translation

I've applied the steps on the sandbox site. Please check if it works correctly. (hidden link)

Best regards,
Osama

January 28, 2024 at 11:15 am #15233970

Daren

Thanks for the workaround for now.
Have tested it on the Sandbox and it works for the most part (List Item 3 still sits there as a ghost entry but it should be fine for now).

Any WPML updates will negate this code, I assume.
Is this going to be fixed in future versions of WPML and/or Elementor? Or should I keep this code offline and update again later after future WPML updates?

January 28, 2024 at 11:18 am #15233974

Daren

Also, no comma after 'shortcode' ?
Lines 2, 3, 4 and 5 all have commas at the end of the line.

January 28, 2024 at 11:38 am #15234011

Daren

Updated the file but my site doesn't seem to be recognizing any changes in that shortcode field.

January 28, 2024 at 12:03 pm #15234025

Osama Mersal
WPML Supporter since 02/2020

Languages: English (English ) Arabic (العربية )

Timezone: Africa/Cairo (GMT+03:00)

Hi,

Please create a new test page using the same icons widget and translate it.

Best regards,
Osama

January 29, 2024 at 3:12 am #15235263

Daren

Thx, Osama.
Test page successfully created and confirmed.
Was also able to delete and recreate a list in the actual page.
Many thanks.

Hopefully, I don't need to recreate the php code after a future WPML update?

January 29, 2024 at 8:27 am #15236473

Osama Mersal
WPML Supporter since 02/2020

Languages: English (English ) Arabic (العربية )

Timezone: Africa/Cairo (GMT+03:00)

Hi,

It's great to hear that the issue is fixed. 🙂 I'm not sure if this workaround will be added to the next WPML release, so please save this workaround so you can use it after updating WPML.

Our compatibility team knows the issue and will work on a permanent fix soon.

Please don't hesitate to open a new ticket if you face any other issues. We are always happy to help you.

Have a great day!

Best regards,
Osama