Skip Navigation

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

Problem:
The client needs to use the same images across all languages and only translate the captions.
Solution:
1. Enable Media Translation
Ensure that you have the WPML Media Translation plugin installed and activated.
2. Set Up Media Translation Settings
Go to WPML > Settings and scroll down to the Media Translation section. Configure the settings to:
- Duplicate existing media for translated content: This ensures the same media files are used across all languages.
- Duplicate media attachments for translations: This allows media library items to be duplicated for translations.
3. Translate Image Captions
Go to WPML > Media Translation, find the image, and enter the translated captions for each language.
4. Ensure Proper Synchronization
In WPML > Settings, set the 'Media (attachment)' post type to 'Translate' and ensure relevant custom fields are set to 'Translate'.
5. Check Your Content
When adding or editing content, add images as usual and translate the captions in the Media Translation section.

If this solution does not resolve your issue or seems outdated, we recommend checking related known issues at https://wpml.org/known-issues/, verifying the version of the permanent fix, and confirming that you have installed the latest versions of themes and plugins. If the problem persists, please open a new support ticket at WPML support forum.

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.

Tagged: 

This topic contains 1 reply, has 2 voices.

Last updated by Mihai Apetrei 8 months, 3 weeks ago.

Assisted by: Mihai Apetrei.

Author Posts
July 16, 2024 at 1:02 pm #15960650

infoS-2

We also need to use the same images for all languages, and only translate the captions if present. Which are the settings to achieve such setup?

July 16, 2024 at 1:14 pm #15960710

Mihai Apetrei
Supporter

Languages: English (English )

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

Hi there,

Thank you for reaching out to us. You can achieve the setup where the same images are used across all languages, and only the captions are translated by adjusting the WPML media translation settings. Here are the steps to configure this and translate the content manually:

1. Enable Media Translation
Ensure that you have the WPML Media Translation plugin installed and activated.

2. Set Up Media Translation Settings

2.1. Go to WPML > Settings.
2.2 Scroll down to the Media Translation section.
2.3 Configure the following settings:

- Duplicate existing media for translated content: This will ensure that the same media files (images) are used across all languages.
- Duplicate media attachments for translations: This allows the media library items to be duplicated for translations.

3. Translate Image Captions

To translate only the captions:

1. Go to WPML > Media Translation.
2. Here, you will see a list of all media files.
3. Click on the 'edit' link next to the image you want to translate.
4. You will see fields for different languages where you can enter the translated captions.
5. Enter the translated caption for each language and save.

4. Ensure Proper Synchronization

To make sure everything is synchronized:

1. Go to WPML > Settings.
2. In the Post Types Translation section, set the 'Media (attachment)' post type to 'Translate'.
3. In the Custom Fields Translation section, ensure that the custom fields related to media, such as `_wp_attachment_image_alt`, `_wp_attachment_image_title`, and `_wp_attachment_image_caption`, are set to 'Translate'.

5. Check Your Content

When you add or edit a post/page:

1. Add your images as usual.
2. Translate your post/page content as needed. The images will be shared across languages, but the captions can be translated in the Media Translation section.

Example Walkthrough:

1. Upload an Image:
- Upload an image in the media library.
2. Translate Captions:
- Go to WPML > Media Translation, find your image, and translate the captions for each language.
3. Insert Image into Posts/Pages:
- Insert the image into your post or page. When you switch languages, the same image will appear with the translated caption.

Following these steps should allow you to use the same images across all languages while having the captions translated appropriately.

PS: If you translate content automatically, that information coming from the media should show up in the advanced translation editor and WPML should be able to see it and automatically translate it, but there might be a case where maybe you want to translate the captions in a specific way.

You can take a look at what my colleague mentioned here, too:
https://wpml.org/forums/topic/want-to-translate-captions-set-on-media-images-in-advance/#post-15311734

I hope that you will find all this information helpful.

Mihai Apetrei