Skip Navigation

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.

Sun Mon Tue Wed Thu Fri Sat
- 7:00 – 15:00 7:00 – 15:00 7:00 – 15:00 7:00 – 15:00 7:00 – 15:00 -
- - - - - - -

Supporter timezone: Pacific/Easter (GMT-06:00)

Tagged: 

This topic contains 7 replies, has 3 voices.

Last updated by Ilyes 1 year, 5 months ago.

Assisted by: Ilyes.

Author Posts
November 30, 2023 at 4:03 pm #14965045

joergS-30

I'm trying to translate SiteOrigin Widgets but some widgets cannot be translated excecially widgets within SiteOrigin Layout Builder.

November 30, 2023 at 4:05 pm #14965057

Nicolas V.
Supporter

Languages: English (English ) French (Français )

Timezone: America/Lima (GMT-05:00)

Hi,

As discussed during our call, could you please provide me with an admin access. I will activate a private field for your next answer where you can provide that information safely (this field is only visible by you and the support team). Don't share your own admin account, create a new one that you will delete when we finish troubleshooting.

IMPORTANT: Before we proceed, please backup your site and database.

November 30, 2023 at 10:01 pm #14967879

Nicolas V.
Supporter

Languages: English (English ) French (Français )

Timezone: America/Lima (GMT-05:00)

Hello,

I spent quite some time on the site but couldn't make it work. It seems that there are no issue using the same widget outside layouts. But as soon as you insert those widgets in a layout builder widget, it will create issues.

I have escalated your ticket to the compatibility team. I'll get back to you as soon as I have their feedback.

Please keep the same credentials

December 11, 2023 at 12:01 pm #15036699

Nicolas V.
Supporter

Languages: English (English ) French (Français )

Timezone: America/Lima (GMT-05:00)

Hello,

Thanks again for reporting this bug. We identified the issue and found a workaround.

Somehow, the Layout builder and the first widget instead it end up with the same 'id', replacing the 'id' by the 'widget_id' solves the issue.

- Open wp-content/plugins/sitepress-multilingual-cms/addons/wpml-page-builders/classes/Integrations/SiteOrigin/TranslatableNodes.php file
- Around line 142, replace:

public function get_string_name( $node_id, $field, $settings ) {
		return $node_id . '-' . $settings[ self::SETTINGS_FIELD ]['id'] . '-' . $field['field'];
}

With

public function get_string_name( $node_id, $field, $settings ) {
	return $node_id . '-' . $settings[ self::SETTINGS_FIELD ]['widget_id'] . '-' . $field['field'];
}

- Do a small modification on the original page and save
- Update the translation

I tested it on a sandbox site and it works correctly. Could you please confirm it works for you too? If you need help to implement that change, just let me know.

December 12, 2023 at 8:22 am #15042953

joergS-30

Hello Nicolas,

thank you for. I tried the workaround.
It could fix most of the issue, but unfortunately not everything.
Some of the texts I could not translate are now available.
The grid with the 6 pictures still does work. I still only can see the title of the last image.
(Handchirurgie) The translation of this last segment appears on all other images.

Is there a solution?

thanks and best regards
Jörg

December 13, 2023 at 12:26 am #15050177

Nicolas V.
Supporter

Languages: English (English ) French (Français )

Timezone: America/Lima (GMT-05:00)

Hi Jörg,

Thanks for reporting this. Could you please try to reproduce on the test site I created for the compatibility team? I'm not sure to understand how you created those 3 columns 2 rows image galleries.

Auto-login URL: hidden link

Please let me know once the issue is reproduced.

December 20, 2023 at 1:18 pm #15103103

joergS-30

Hello,

sorry for the late reply.
I tried the issue on your test site. I created a Page Builder Layout widget on the Page "SiteOrigin test" that contains two Hero Widgets (that's the way I built the image grid on the initial page).
The left hero widget contains the text "Column 1", the right on contains "Column 2".
Only the string "Column 2" is available for translation.

Hope there is a solution for that.

Thanks and regards
jörg

December 21, 2023 at 4:12 pm #15112051

Ilyes
Supporter

Languages: English (English ) French (Français ) Arabic (العربية )

Timezone: Pacific/Easter (GMT-06:00)

Hello Jörg,

Nicolas is currently offline, so I will take care of your request in the meantime,

Thank you for taking the time to replicate the issue,

I do see that the 1st column isn't detected by WPML and I have shared it with our compatibility team to further test it with different layouts,

I will get back to you once I receive a solution,

Best,