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 Yvette 1 month, 2 weeks ago.

Assigned support staff: Yvette.

Author Posts
September 3, 2019 at 2:46 am #4500597

billL-7

I'm building a custom wpml-config.xml file for translating block attributes and getting more data in translations that expected. Mainly when dealing with an attribute that stores an image object.

When the image object key is passed it's getting most of the data for translation, but not all some fields are being skipped.

I've seen the `get_keys_recursively()` function that runs through the keys and returns data. It does seem if I define down to specific keys in the image object only that key is returned. For example, grabbing the alt from the image object.

I'm trying to get a better idea on how to prevent extra information from being loaded in unexpectedly. Is it the expected behavior to have a key defined and if no keys are defined within to parse for all keys infinitely?

I'm also trying to find out why some keys don't get returned. Namely it seems to be keys that contain urls that get skipped, but also the string "image/jpeg" was returned while "image" wasn't.

Is the expected behavior that if a key at any level is defined only that key is returned, but if no key is defined it will try to parse all keys?

September 3, 2019 at 3:26 pm #4505825

Yvette
Supporter

Languages: English (English ) Spanish (Español )

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

Hello

I believe the crux of your message is this:
"...Is the expected behavior that if a key at any level is defined only that key is returned, but if no key is defined it will try to parse all keys?..."

I am assuming that you are referring to pagebuilder shortcodes when you talk about "keys" and "attributes".

Is this correct? If so, please specify which pagebuilder you are using.

It woudl also be very helpful for me if you could include a concrete example with screenshots. I would then be able to possbily follow up with a developer to get you the clarifications you are seeking.

THanks

The topic ‘[Closed] Block wpml-config pulling in extra data for translation’ is closed to new replies.