WPML Media Translation allows to choose images and other media for translated content. You will be able to provide replacement images for content in different languages and translate the meta texts of those images.
You should use WPML Media Translation when you are using WPML Translation Management and you need to show different images for translated content.
We are talking about choosing other image files for translated content. If you are looking for how to translate the text content in images, check out projects like Google Image Translation and ImageTranslate.
In this guide:
- When to Use WPML Media Translation
- Translating Attached Images and Other Media
- Translating the Page that Includes Images
- Translation for Image Captions and Titles
- Media Translation Settings
To understand when you need the Media Translation plugin, first see how you would translate images without it. WPML core plugin allows you to manually translate the images and media in your content. In this case, you translate them just as any other part of your pages.
You would use the WordPress editor to edit translations. There, you can upload different images for different translations.
However, when you use WPML’s Translation Management, you don’t edit each translation in the WordPress editor. You edit translations in a dedicated editor for translation (inside WPML or by a translation service). In that case, you need a separate tool to provide translation for images. This is WPML Media Translation.
Some of your content may include images containing text (i.e., screenshots of user interface items) that must be presented in different languages.
For example, here is a welcome page for WordPress.
|The English page includes a screenshot of the WordPress admin in English||The Spanish text includes a screenshot of the WordPress admin in Spanish|
This page includes a large screenshot that contains text. When we translate this page into Spanish, we want to include a screenshot of the WordPress admin, where the text included in that image is in Spanish.
The Media Translation plugin allows you to upload “replacement” images for different translations. In this manner, you can translate the texts on the page using WPML’s Translation Management and provide replacement images for images that feature text which requires translation.
When you need to show images with content that you translated using WPML’s Translation Management, you should never edit that content manually using the WordPress “post editor.” If you do, your edits will be lost the next time you update this content using Translation Management.
- Go to WPML -> Translation Management to send content for translation. There, when you choose any content that has media files, you will see a list of the attached media. Select all images for which you want to use “replacement” images in other languages.
- After sending the content for translation, go to WPML -> Media Translation. There, you can filter by “Needs Media File Translation.” You will see only images that you previously selected as requiring translation. Click to edit any image and upload its replacement.
Here is a quick video that shows this entire process:
As you translate the page, you will see the content that includes the images requiring translation.
Be sure to include the images in the translation and to translate their meta texts. You do not need to upload replacement images here or edit the image shortcodes. You only need to translate the texts. WPML’s Media Translation will later replace the actual images with their translations.
WordPress makes a copy of the image captions and title texts when you insert images into content. You must translate these texts in the Translation Editor.
The texts that you translate in WPML -> Media Translation belong to the attachments. You will see these translated texts when you create image galleries or load the images using other methods.
The options for translating media can be found at the bottom of the WPML -> Settings page.
You can set options how to translate:
- Existing media content
- Set media languages – sets the language to existing media. This is something you should do if you want to use WPML Media Translation.
- Translate existing media in all languages – duplicates existing media into all languages.
- Duplicate existing media for translated content – goes through all existing content. If there is a translation and the content has media, it will update the translated content with the corresponding translated media.
- Duplicate the featured images for translated content – goes through all existing content. If there is a translation and the content has featured images, it will update the translated content with the corresponding featured images.
- New media content
- When uploading media to the Media library, make it available in all languages – duplicates newly uploaded media so that it is available in all languages.
- Duplicate media attachments for translations – duplicates newly uploaded media so that it can be translated.
- Duplicate featured images for translations – duplicates newly uploaded featured image so that it can be translated