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 thread is resolved. Here is a description of the problem and solution.

Problem:

How can I translate the alt image attributes on a translated page?

Solution:

In our case, the situation was pretty unique as the client was using shortcodes and the alt attribute was present in the shortcode itself, so all that was needed was for the alt attribute to be edited straight inside the shortcode, as shown in the screenshots below.

In most cases, following the documentation below is enough (it requires you to install the WPML Media Translation from your WPML.org account): https://wpml.org/documentation/getting-started-guide/media-translation/

This topic contains 6 replies, has 2 voices.

Last updated by alexanderA 1 year ago.

Assigned support staff: Mihai Apetrei.

Author Posts
September 24, 2018 at 5:13 pm #2761424

alexanderA

Hello. I have used WPML to create a French translation of my site. On my English language home page are two images, and each of these has English language alt text. These two images are also present on my French language home page, and they have French language alt text. But unfortunately I cannot remember how I translated this text. I have checked WPML-->String Translation and cannot find it, nor is this text present when I open the image in media library. How can I determine how this French alt text was added? The reason I ask is because I have now brought online a Chinese version of the home page, and I would like this alt text translated into Chinese.

Thanks.

September 24, 2018 at 6:20 pm #2761540

Mihai Apetrei
Supporter

Languages: English (English )

Timezone: Europe/Bucharest (GMT+03:00)

Hi and thank you for writing us!

I will be happy to help you with this.

Are you using WPML Media ?

If not you can get it from the downloads page:
https://wpml.org/account/downloads/

In order to translate the alt attribute for images, you should:
- Go to Media Library
- In the top bar menu, select your language of interest
- Select an image and edit its attributes.

Actually when you change language on the top menu, you are also changing language for Media library, that means every change you make in your images will be reflected in your selected language.

You can find more information here:
https://wpml.org/documentation/getting-started-guide/media-translation/

Let me know how it goes.

September 24, 2018 at 6:30 pm #2761558

alexanderA

I am indeed using WPML Media. But when I open the image in-question in media library, there is no alt text assigned (see attached screenshot hh-media-alt-back).

To confirm, the image on the front end has a French language alt text assigned to it (see attached screenshot hh-media-alt-front).

Thanks.

September 25, 2018 at 11:34 am #2763501

Mihai Apetrei
Supporter

Languages: English (English )

Timezone: Europe/Bucharest (GMT+03:00)

I see.

Then I will need to look a bit more in depth at the issue.

To further debug the problem I will need to request temporary access (wp-admin and FTP) to your site to take a better look at the issue. A testing site where the issue is replicated would also be helpful.

You will find the needed fields for this below the comment area when you log in to leave your next reply. The information you will enter is private which means only you and I can see and have access to it.

Maybe I'll need to replicate your site locally. For this, I’ll need to temporarily install a plugin called “Duplicator” on your site. This will allow me to create a copy of your site and your content. Once the problem is resolved, I will delete the local site.

Let me know if this is ok with you.

** IMPORTANT **

- Please make a backup of site files and database before providing us access.
- If you do not see the wp-admin/FTP fields, this means your post & website login details will be made PUBLIC. DO NOT post your website details unless you see the required wp-admin/FTP fields. If you do not, please ask me to enable the private box.

The private box looks like this:
hidden link

Also, can you please paste your WPML Debug information in the Debug information field?
http://wpml.org/faq/provide-debug-information-faster-support/

October 1, 2018 at 4:11 pm #2778734

Mihai Apetrei
Supporter

Languages: English (English )

Timezone: Europe/Bucharest (GMT+03:00)

Hi.

The WP credentials don't work for me.

Can you please verify and get back to me with updated ones?

I will enable the private field once again.

October 16, 2018 at 2:00 pm #2821216

Mihai Apetrei
Supporter

Languages: English (English )

Timezone: Europe/Bucharest (GMT+03:00)

Hi.

By looking at the French page, I can see that there's a good amount of shortcodes being used and that the page has been manually translated.

At the very top where we have the [types] shortcode:

- click on the blue text
- click the pencil icon
- click the settings gauge icon
- now, in the "Link Text" field, feel free to scroll to the right and between the quotes that are related to the "alt" attribute, you can use the text that you want (for eg: alt="your new alt description") - I will also attach a few screenshots
- after you edited what's between the quotes, click the blue "Update" button
- then scroll a bit more down the page and on the right click on the blue "Update" button.

This should fix this.

Please let me know if this solved your issue or if you still need help.

I will be waiting for your response.

Kind regards,
Mihai

October 16, 2018 at 2:23 pm #2821387

alexanderA

My issue is resolved now. Thank you!