[Resolved] some images are not being translated using media translation
This thread is resolved. Here is a description of the problem and solution.
Problem: You are trying to translate images on your site using WPML, but some images are not being translated using media translation. This issue is related to a compatibility problem between the Real Homes theme, Easy Real Estate plugin, and WPML Media Translation. Solution: 1. Continue using WPML Media Translation to upload media for second languages. For Listings, apply the following workaround: - Go to WPML > Settings > Custom Field Translation and search for the field "REAL_HOMES_property_images". - Unlock the field and set its translation preference to "Don't translate". This allows you to manually select images on the translated post. 2. If displaying different images in different languages, upload alternative media files for the second languages at WPML > Media Translation. 3. If using the same image in both languages, check settings at WPML > Settings > Media Translation for options on duplicating media and making metadata from images available in the WPML Translation Editor. 4. Visit this link and then add the custom XML configuration to WPML > Settings > Custom XML Configuration to handle the translation of property images: https://wpml.org/forums/topic/some-images-are-not-being-translated-using-media-translation/?paged=2#post-17452664 After adding this, update the original property and then update its translation.
If this solution does not resolve your issue or seems outdated, please check related known issues at https://wpml.org/known-issues/, verify the version of the permanent fix, and confirm that you have installed the latest versions of themes and plugins. We highly recommend opening a new support ticket if needed.
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.
Languages: English (English )Spanish (Español )German (Deutsch )
Timezone: America/Lima (GMT-05:00)
Hello,
I would like to offer to take a closer look and request temporary access (wp-admin and FTP) to the website to investigate the issue further.
The required fields are located below the comments section when you log in to leave the next reply. The information you provide is private, meaning only you and I can see and access it.
IMPORTANT
Please be sure to back up your website and database before granting us access.
If you can't see the "wp-admin / FTP" fields, your post and website credentials will be set to "PUBLIC." DO NOT publish the data unless you see the required wp-admin / FTP fields.
I may need to install a plugin called "All In One WP Migration" to create a copy of the website so I can investigate the issue further.
However, I would also be very grateful if you could provide a staging site or a copy of the website from your server for this purpose.
If you have any questions about creating such a staging site, you can consult your hosting provider. Please note that WPML must also be registered on this staging site at https://wpml.org/account/websites/.
If you are unable to provide such a copy of the website for testing, please let me know on this ticket.
The private reply form looks like this: hidden link
Click "I still need assistance" the next time you reply.
Video: hidden link
Please note that we are required to request this information individually on each ticket. We are not permitted to access any credentials that were not specifically submitted on this ticket using the private response form.
Languages: English (English )Spanish (Español )German (Deutsch )
Timezone: America/Lima (GMT-05:00)
The reported issue appears to be a compatilbity problem between the Real Homes theme, Easy Real Estate plugin, and WPML Media Translation.
A workaround that could usually be applied in this case:
Keep using WPML Media Translation to upload media for second languages, but keep in mind that for Listings, you need to additionally apply the following workaround.
Instead, go to WPML > Settings > Custom Field Translation and search for the field "REAL_HOMES_property_images".
Unlock the field and set its translation preference to "Don't translate".
This means that now, when translating a listing, the images will not be copied over, and you will be able to select the images manually on the translated post.
Further steps:
I can offer to provide a WPML test site on which you can install the latest versions of the Real Homes theme and the Easy Real Estate plugin, so that we can try to replicate the issue. This way, we can confirm if this is a general issue and take further steps.
thank you so much, but I can't install my theme anywhere else because I only have one key for it..
thank you for your help, but normally they tell me to save the image name somewhere in the translation and that way it will be taken with the needed ID depending on the language, but sadly I forgot the way therefore I couldn't try it..
Could this be a possible solution?
Languages: English (English )Spanish (Español )German (Deutsch )
Timezone: America/Lima (GMT-05:00)
If you are trying to display different images in different languages, then you will need to upload alternative media files for the second languages as WPML > Media Translation.
If you plan to use the same image in both languages, I suggest you verify the settings at WPML > Settings > Media Translation. There, you find options for duplicating media, which means that WPML creates one entry for each image inside the media library. Also, you find an option to make any metadata from images available inside the WPML Translation Editor.
I can offer to create a local copy of the site and investigate further. I suspect that the issue is that the slider on this template is simply not expecting any different ID for media in second languages, and this is why it displays the original media file.
This should be solveable by applying one of WPML's hooks. I will try to find a solution, but note that this final fix will need to be implemented by the plugin author, not by WPML.
With those adjustments, the sliders of the theme will display the correct translated image from WPML Media Translation.
Note that in this case, the custom field "REAL_HOMES_property_images" should remain on its default setting "Copy" at WPML > Settings > Custom Field Translation.
I suggest you propose this fix to the theme author: hidden link
I am further escalating the issue internally, so that our compatilbity team can follow up with Real Homes on this matter.
In case further assistance from our end will be needed, please let me know.
Thank you so much for your help this was a great solution it worked instantly, but I have one question should I be adding this code on every update of wpml plugin?