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.

Sun Mon Tue Wed Thu Fri Sat
- - 9:00 – 18:00 9:00 – 18:00 9:00 – 18:00 9:00 – 18:00 9:00 – 18:00
- - - - - - -

Supporter timezone: America/Lima (GMT-05:00)

This topic contains 7 replies, has 3 voices.

Last updated by Andreas W. 6 months, 2 weeks ago.

Assisted by: Andreas W..

Author Posts
May 20, 2024 at 10:42 am

Xevi Baena Ortigosa

The captions and ALT Texts of the images appear like {%CAPTION%} and {%ALT_TEXT%} in the translation editor

May 20, 2024 at 12:08 pm
May 20, 2024 at 12:13 pm #15645631

Itamar
Supporter

Languages: English (English ) Hebrew (עברית )

Timezone: Asia/Jerusalem (GMT+02:00)

Hi,

As we discussed on the chat, please create a staging site and try the following.

I suspect that there is a collision with the theme or another plugin that might cause this problem. If possible, get your site into a minimum environment, Which means switching to a default WordPress theme like TwentyTwenty-One and having no plugins activated except WPML.

First, you must check if the problem persists when just the theme is switched to TwentyTwenty-One (for example). If it persists, deactivate all plugins except the WPML and its add-ons. Then please check if the problem persists. If it does not persist, start by activating the plugins individually, check when the problem comes back, and then report to me which plugin was the culprit.


**** Important! Please make a full site backup (files and DB) before you proceed with those steps****


*** If your site is a live site, you might want first to try those procedures in a staging environment or a snapshot of your site on your local server or another server. ***

Regards,
Itamar.

May 23, 2024 at 4:24 pm #15664536

Xevi Baena Ortigosa

Sorry for my late reply, super busy days with projects.

Problem persists. Site switched to a wordpress default theme and all the plugins deactivated (only the three WPML plugins are there).

I realised the problem with {%CAPTION%} and {%ALT_TEXT%} it only happens if the image has already those fields created inside the library. In other words: if I add a caption manually to an image that doesn't have it but I want this image to have a caption in the post, then the translation panel shows the correct caption.

At the same time, because WPML is using media translation, the funny thing is that those fields appear correctly inside the "Media" section of the translation screen. Super weird.

Screenshot_9.jpg
Screenshot_10.jpg
May 23, 2024 at 6:04 pm #15664814

Andreas W.
Supporter

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

Timezone: America/Lima (GMT-05:00)

Hello,

I am not sure if there is an issue related to WPML.

If you create the translation with the Classic Translation Editor, then you can adjust the translations to your needs.

If the issue is related to the original content, then this might not be a WPML issue.

Do you see on the left side of the Classic Translation Editor the same source strings as found on your original content?

Also, take note that WPML Media Translation will not sync with the Classic Translation Editor in this case, as you are translating hardcoded shortcodes.

You only need to adjust the shortcode's translations accordingly.

Best regards
Andreas

June 3, 2024 at 10:00 am #15697280

Xevi Baena Ortigosa

The thing is that in the original source (left side) of the Classic Translation Editor) we don't see the original strings, we just see {%CAPTION%} and {%ALT_TEXT%} so it's really annoying to translate that because you don't know what's there as an original string, we have to check the media translation for each image (there yes the fields are correct).

If we ignore that then those {%CAPTION%} and {%ALT_TEXT%} are taken to the front-end and that's what the user (and Google in the case of Alt Texts) sees.

If we deactivate Media translation then we can't translate media fields for files that are inside the galleries and sliders of Elementor page builder (just the media files fields that are inside a text editor).

June 4, 2024 at 9:43 am #15700879

Andreas W.
Supporter

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

Timezone: America/Lima (GMT-05:00)

If these fields are coming from the original content, then those might be placeholders, and you might see the same placeholders appear on the original content and on the the translation, as the media's meta information has not yet been edited or translated.

You should add meta information to the original media inside the media library to solve the issue of the original content.

You can create translations directly inside the Media Library by switching the language inside the top admin bar or using WPML > Media Translation which then should replace those placeholders with the expected text in second languages.

The plugin WPML Media is usually only needed if you want to replace alternative media in a second language with different files. Anyhow, I doubt that disabling this plugin would change something about the reported behavior.

I can offer to send you a link to a WPML test site on which you could replicate the issue with a simple example so that I can take a closer look into it. Would you be able to cooperate on this matter?

June 15, 2024 at 1:56 pm #15741773

Xevi Baena Ortigosa

Hey Andreas! Thanks for yor answer. Yes, I would like to test to see how to get out of this puzzle 🙂

June 15, 2024 at 5:57 pm #15741972

Andreas W.
Supporter

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

Timezone: America/Lima (GMT-05:00)

Thank you for your cooperation!

You said:
"The thing is that in the original source (left side) of the Classic Translation Editor) we don't see the original strings, we just see {%CAPTION%} and {%ALT_TEXT%} so it's really annoying to translate that because you don't know what's there as an original string, we have to check the media translation for each image (there yes the fields are correct)."

1) It is expected that those placeholders appear on the Classic Translation Editor, as this editor does not strip out such contents.

2) You need to translate those placeholder one-to-one. They need to be existent on the translated content. It is a placeholder that will pull the values from the media library.

3) If you do not copy the same placeholders to the translated content it is expected that the translation will not work.

4) If you experience issues related to the original content, please test if this issue persists once you disable WPML, as in this case it would not be a WPML issue.

Question:
Does the translation work, if you copy the placeholders to the translated content and the media information is translated inside the media library?

If so, then this is expected and not an issue.

If not, then here is the one-click-login for the test site:
hidden link

Leave me a message on this ticket, once you are done recreating the issue.

The topic ‘[Closed] The captions and ALT Texts of the images appear like {%CAPTION%} and {%ALT_TEXT%} in the translation editor’ is closed to new replies.