Skip Navigation

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

Problem:

keep the same alternative text for images between languages

Solution:

Go to WPML-> Sittings-> Custom Fields Translation section, then type “_wp_attachment_image_alt” on the search box, and set it to copy

0% of people find this useful.

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 16 replies, has 2 voices.

Last updated by ioannisB-7 4 years ago.

Assisted by: Osama Mersal.

Author Posts
January 22, 2021 at 10:43 pm #7909317

ioannisB-7

Tell us what you are trying to do?
When translating a product I can see all its images (and the option to change their names, alternative text, etc). For my purposes I will never need to change images between two languages, either its name or alternative text. But as you can see in the picture alternative_text.png the text isn't transferred to the other language and I will have to either write it again or press the copy button and I am afraid somebody will forgot too. So I would like the alternative text to be passed over the translation as happens with the image name.

Is there any documentation that you are following?
No

Is there a similar example that we can see?
Look at the image

What is the link to your site?
chimeracraft.gr

alternative_text.png
January 24, 2021 at 9:02 am #7914747

Osama Mersal
Supporter

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

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

Hi,

Thanks for contacting WPML forums support. I’ll be glad to help you today.

You can set the alternative text for attachment images to copy among languages by going to WPML-> Sittings-> Custom Fields Translation section, then type “_wp_attachment_image_alt” on the search box, and set it to copy. (Kindly check that attached screenshot)

I hope this reply helps you. If you need further info, please let me know.

Best regards,
Osama

1.png
January 24, 2021 at 10:56 am #7915127

ioannisB-7

I can't change it. As you can see from the image it is grey out and has a lock icon.

attached image.png
January 24, 2021 at 10:59 am #7915151

Osama Mersal
Supporter

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

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

Hi,

Kindly click on the lock icon and the custom field will be unlocked to edit it.

Regards,
Osama

January 24, 2021 at 11:02 am #7915159

ioannisB-7

Do you think I haven't clicked on the lock icon!
Of course I did but nothing changes...

January 24, 2021 at 11:10 am #7915179

Osama Mersal
Supporter

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

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

Hi,

Sorry, you are facing this issue. I would need to request temporary access (WP-Admin and FTP)
– preferably to a test site where the problem has been replicated if possible –
in order to be of better help and check if some configurations might need to be changed

Your next answer will be private, which means only you and I have access to it.

❌ Please backup your database and website ❌

✙ I would additionally need your permission to de-activate and re-activate Plugins and the Theme and to change configurations on the site if needed. This is also a reason the backup is critical.

Thanks for your cooperation

Best regards,
Osama

January 24, 2021 at 11:57 am #7915283

ioannisB-7

As I have tested, the same issue is also on the test site you have proposed to create on your server: hidden link
Do you have access there or do you want to create an account to the live site?

January 24, 2021 at 12:00 pm #7915285

Osama Mersal
Supporter

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

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

Could you please provide me access (WP-Admin) to the test site?

Thanks,
Osama

January 24, 2021 at 12:09 pm #7915293

Osama Mersal
Supporter

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

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

Hi,

Thanks for providing the access details. I've checked the test site and followed the previous steps, and it worked correctly. (Kindly check the attached screenshot)

Thanks,
Osama

1.png
January 24, 2021 at 12:15 pm #7915321

ioannisB-7

Somehow the issue is resolved now. Thank you!

January 24, 2021 at 12:17 pm #7915323

Osama Mersal
Supporter

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

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

Great to hear that it's resolved now. Thank you for the confirmation. We are always happy to help you.

Have a great day,

Thank,
Osama

January 24, 2021 at 12:28 pm #7915339

ioannisB-7

I am afraid that the issue is not resolved.
I did what you have suggested but as I go to the translated media I still see that the alternative text is empty.
I also went to Settings > Media translation and pressed Start (see image) but again nothing changed.

settings.png
alt text.png
January 24, 2021 at 12:52 pm #7915443

Osama Mersal
Supporter

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

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

Hi,

Could you please try to set “_wp_attachment_image_alt” to "Don't translate" and try again?

I've tried this on the test site and uploaded two photos, and the values of alternative texts were displayed like the values of the image title. (Kindly check the attached screenshot)

Here is the post I've created. Kindly try to translate it to see the alt values.
(hidden link)

Thanks for your cooperation

Regards,
Osama

1.png
January 24, 2021 at 1:11 pm #7915525

ioannisB-7

Please go to WooCommerce Multilingual and try to translate on of my already created products.
It is not working!

January 24, 2021 at 2:08 pm #7915771

ioannisB-7

I think I found what it might be the problem. I am using «Format Media Titles» plugin in order to automatically fill the media title and alt text from media file name. Now I deactivated this plugin and I enable the «Image Attributes Pro» in its position (which does the same thing) and now it works.