Skip to content Skip to sidebar

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
- 10:00 – 17:00 10:00 – 17:00 10:00 – 17:00 10:00 – 17:00 10:00 – 17:00 -
- 18:00 – 19:00 18:00 – 19:00 18:00 – 19:00 18:00 – 19:00 18:00 – 19:00 -

Supporter timezone: Asia/Kathmandu (GMT+05:45)

This topic contains 0 reply, has 0 voices.

Last updated by Shekhar Bhandari 9 months, 1 week ago.

Assisted by: Shekhar Bhandari.

Author Posts
December 17, 2024 at 10:04 pm #16523676

ninaR-3

Background of the issue:
I am trying to copy an ACF block gallery. The process works, but one of the captions is not fully translated. The full caption is present in the database. The issue can be seen on this page: hidden link We're translation with the WPML classic editor.

Symptoms:
The caption in the translated media gallery isn't fully displayed. Instead of the full caption, I see 'Intersektionalität und Awareness – Kurs mit'.

Questions:
Why is the caption not fully displayed in the translated media gallery?
How can I ensure the full caption is shown as expected?

December 18, 2024 at 5:04 am #16524064

Shekhar Bhandari
WPML Supporter since 03/2015

Languages: English (English )

Timezone: Asia/Kathmandu (GMT+05:45)

Hello there,

Thank you for contacting WPML support. I'd be happy to assist you on this issue.

Looks like some settings are missed which is creating the issue, to debug this issue further, I would need to check your site settings once, for this I would need temporary access (wp-admin and ftp) to your site.

So could you please provide me with those details, you will find the needed fields for this below the comment area when you log in to leave your next reply.
hidden link

This info is private and available to you and WPML supporters only.
Read more about this: https://wpml.org/purchase/support-policy/privacy-and-security-when-providing-debug-information-for-support/

Note:
Backup your sites before providing the credentials or if possible provide credentials for the test site

Look forward to your reply.

Thanks

December 18, 2024 at 8:43 am #16524687

Shekhar Bhandari
WPML Supporter since 03/2015

Languages: English (English )

Timezone: Asia/Kathmandu (GMT+05:45)

Hello there,

I can't find login details to check this further.

Also, what's the relation of search and replace plugin in this issue, did you replaced the translations directly in the database?

Look forward to your reply.

Thanks

December 18, 2024 at 9:12 am #16524824

ninaR-3

Hi, can you set up a private message again, so I can send you the login details? The search and replace I did in order to see how the specific string was present in the database. (I only did a search in this case). As you can see, the whole string is present in the db.

December 18, 2024 at 9:21 am #16524850

Shekhar Bhandari
WPML Supporter since 03/2015

Languages: English (English )

Timezone: Asia/Kathmandu (GMT+05:45)

Sure, I have enabled the private reply for you.

Thanks

December 18, 2024 at 11:52 am #16525642

Shekhar Bhandari
WPML Supporter since 03/2015

Languages: English (English )

Timezone: Asia/Kathmandu (GMT+05:45)

Hello there,

I went to WPML->Media Translations searched for image and it's caption translations and the caption is translated like such. [Screenshot attached]

Am I missing something?

Look forward to your reply.

Thanks

Media-Translation-‹-Helvetiarockt-—-WordPress-12-18-2024_04_27_PM.jpeg
December 18, 2024 at 2:52 pm #16526576

ninaR-3

Ok thanks for checking. I don't think my client is using media translation but I'll double check with her. She is using an acf block for an image gallery in german. This acf block with the image gallery is set to copy. Therefore she is expecting the same caption in the other languages than in german.

December 19, 2024 at 3:16 am #16528316

Shekhar Bhandari
WPML Supporter since 03/2015

Languages: English (English )

Timezone: Asia/Kathmandu (GMT+05:45)

Certainly! Even if the ACF field is set to "copy" and has media translations, it will still use the translations. Therefore, I recommend setting the caption translations directly in WPML -> Media Translations.

December 19, 2024 at 11:47 am #16529876

ninaR-3

But is it possible to remove the translations and only use the copied images and captions? And copy the whole image array as intended?

December 19, 2024 at 11:58 am #16529925

Shekhar Bhandari
WPML Supporter since 03/2015

Languages: English (English )

Timezone: Asia/Kathmandu (GMT+05:45)

Hello there,

Please follow the below steps and see if it helps:

- Disable WPML media Translaitons
- Go to Dashboard->Media
- Change the language to secondary language and remove the media translations

- Go to WPML->Settings->Media Translation
- Check the following options
-- Translate existing media in all languages
-- Duplicate existing media for translated content
-- Duplicate the featured images for translated content
- Click on the start button and wait for it to finish.

Thanks

December 20, 2024 at 9:34 am #16532888

ninaR-3

Hi Shekhar,

I did what you suggested on our staging site. I went to dashboard media, then to the secondary language and deleted all texts. I went to WPML->Settings->Media Translation, checked all the settings and clicked on start.

As you can see without luck, the caption of the third image stays empty: hidden link

What I also tried is changing something in the image caption of the first language to see whether its updating then in the other languages. Again with no luck.

Again what we'd like to achieve with this acf block image gallery: We want to only add the images and the captions in the first language. The acf setting is set to copy. We then want that all the images including the captions are synced in the other languages.

We've never used the media translations screen (and don't want to start using it).

December 20, 2024 at 9:36 am #16532900

ninaR-3

Screenshots attached

Screenshot 2024-12-20 at 10.18.09.png
Screenshot 2024-12-20 at 10.27.40.png
December 20, 2024 at 9:49 am #16533020

Shekhar Bhandari
WPML Supporter since 03/2015

Languages: English (English )

Timezone: Asia/Kathmandu (GMT+05:45)

Hello there,

Can you provide me the code where you are loading the images, we can use WPML filters and ask them to always load contents from the default language.

Look forward to your reply.

Thanks

December 20, 2024 at 1:14 pm #16534358

ninaR-3

I use timber twig and that the gallery loop:

<ul class="page-gallery__list">
{% for image in fields.gallery %}

{% set sizes_image = "(min-width: 37.5em) 30vw, 100vw" %}

{% set src_image = image.url %}
{% set alt_image = image.alt %}

<li class="page-gallery__item">
<div class="page-gallery__image-box">
<img src="{{image.src}}" alt="{{image.alt}}"
srcset="{{sm_image}} 250w, {{md_image}} 400w, {{lg_image}} 600w"
sizes="{{sizes_image}}"
class="project-impression__image"/>
</div>
<p class="page-gallery__caption">{{image.caption}}</p>

{% endfor %}

However, I'm still curious: If the acf block is set to copy: can I then not assume that all the images incl the captions should be copied into the other languages / synced with the other languages?

December 20, 2024 at 1:18 pm #16534361

ninaR-3

By the way: this hidden link is a staging site and can be used for testing. The same login details apply also for this site.

The topic ‘[Closed] Caption in translated media gallery isn’t fully displayed.’ is closed to new replies.