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.

This topic contains 6 replies, has 2 voices.

Last updated by sebastianB-18 1 year, 5 months ago.

Assisted by: Nigel.

Author Posts
November 11, 2022 at 1:50 pm #12439815

sebastianB-18

Hello WPML-Team,

i have a page with a couple of custom Gutenberg Blocks created with ACF.
My customer use the automatic translation (with Deepl) via Advanced Translation Editor.
Most of the fields from the custom blocks a shown in the Advanced Translation Editor as expected. But one block "Photo-Block" with a Image field are missing in the editor. So there is no way to use the automatic translation functions for that block.
With the "Media Translation" or the Media Library the manuell translation of a media file is possible.

I had read the following guide:
https://wpml.org/documentation/getting-started-guide/media-translation/

Attachements:
"screen-1" - shows the field configuration
"screen-2" - shows the Advanced Translation Editor
"screen-3" - shows the block in the block editor

Domain:
Live-Domain: hidden link

If you need access to the staging server please tell me and i will give you temporary access.
The screens and the Debug info are from my local development environment.

Many thanks in advance.

Regards,
Sebastian

screen-3.jpg
screen-2.jpg
screen-1.jpg
November 14, 2022 at 8:58 am #12451777

Nigel
Supporter

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

Hi Sebastian

Checking my own local test site, I note that when I include an image from the media gallery that has alt and caption text directly in the post content (e.g. via an Image block) then those texts are offered for translated in the ATE editor.

But if I add the same image to an ACF image field belonging to a post, then those texts are not offered for translation. (They must be translated via translating the media, not via translating the post they are used in.)

I'm double-checking with my colleages if I'm missing any way to ensure the texts are offered for translation with the post (or if this will change in the upcoming ACFML 2.0 version).

I'll get back to you.

November 14, 2022 at 12:23 pm #12453855

Nigel
Supporter

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

I checked and it was confirmed that the text fields of images added as an ACF image field are not offered for translation in ATE, you must translate the media directly.

(You can either use the WPML Media plugin for your workflow to translate media, or without that, if you edit an individual image in the Media Library you can use the language switcher in the admin toolbar to add a translation for the image texts.)

I have raised this internally as a feature request for the ACFML plugin and it has been accepted in principal, but that doesn't imply anything about when it might be worked on.

As an aside, you may be interested to know that version 2.0 of ACFML is under active development (we have a beta available https://wpml.org/compatibility/2022/11/acfml-2-0-beta-better-setup-and-translation-workflow/).

November 17, 2022 at 9:01 am #12479533

sebastianB-18

Hi Nigel,

many thanks for your reply.
That means, there is actually no way for an automatic translation of an ACF image field, right?
What's about the beta of ACFML version 2.0 is there the possibility to automatic translate ACF image fields? I will give it a try on my local development environment.

An other related question: I added a custom field with ACF to image attachment files. Is there a way to show these custom field in the WPML Media plugin for translation?
Currently it's only possible to translate it in the Media Library.

Thank you in advance and best regards,
Sebastian

November 17, 2022 at 9:23 am #12479901

Nigel
Supporter

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

Hi Sebastian

The feature request I posted has prompted quite an internal discussion, which is ongoing, so I currently can't say how this will change (or when), I can just confirm how things work presently.

Right now texts related to ACF Image fields need to be translated via WPML > Media Translation, or by editing the attachment post in the WordPress Media Library and then using the language switcher in the toolbar.

They are not ordinarily available for translation with the content, which means they are not picked up by automatic translation.

You second assertion is also correct, any custom fields assigned to attachment posts could only be translated via editing the attachment post in the WordPress Media Library.

Now I said "ordinarily" above, so let me clarify that it depends somewhat on how you are using these fields and displaying the texts.

Consider the core WordPress Image block.

If you insert an image from your media library into a post, then the texts (alt, caption) become embedded in the markup for the block. (Switch the post to code editor to see how exactly.)

Because those texts are now in the content itself, when you send the post for translation then the texts become available for translation.

What you would be translating is the embedded version of the texts, not the texts from the attachment post source. (If the attachment post has texts such as caption text, then when you insert the Image block it will default to that text, but you can then modify it.)

I hope that gives you enough clarity about how things work currently, as I say, I'm not sure how things will be updated in the future.

November 17, 2022 at 10:34 am #12480773

sebastianB-18

Hello Nigel,

thank you for your efforts.
I cross my fingers that there will be a way to use the automatic translation feature with ACF image fields in the future.

I will mark this thread as resolved.

Regards,
Sebastian

November 17, 2022 at 10:36 am #12480781

sebastianB-18

My issue still exist but there is currently no solution for that.

This ticket is now closed. If you're a WPML client and need related help, please open a new support ticket.