{"id":7455,"date":"2011-05-11T07:38:07","date_gmt":"2011-05-11T07:38:07","guid":{"rendered":"http:\/\/wpml.org\/?p=7455"},"modified":"2016-09-12T12:50:55","modified_gmt":"2016-09-12T12:50:55","slug":"new-plugin-wpml-media-translation","status":"publish","type":"post","link":"https:\/\/wpml.org\/es\/changelog\/2011\/05\/new-plugin-wpml-media-translation\/","title":{"rendered":"New Plugin &#8211; WPML Media Translation"},"content":{"rendered":"<p><strong>Do you have trouble duplicating images and other media between languages? You&#8217;re not alone. It&#8217;s always been a problem and now it&#8217;s solved.<\/strong><\/p>\n<p><img decoding=\"async\" class=\"alignright size-full wp-image-7471\" src=\"http:\/\/wpml.org\/wp-content\/uploads\/2011\/05\/gallery-icon.png\" alt=\"\" width=\"222\" height=\"185\" srcset=\"https:\/\/wpml.org\/wp-content\/uploads\/2011\/05\/gallery-icon.png 222w, https:\/\/wpml.org\/wp-content\/uploads\/2011\/05\/gallery-icon-150x125.png 150w\" sizes=\"(max-width: 222px) 100vw, 222px\" \/>Many themes, especially those designed for photographers and artists, rely heavily on the WordPress Gallery functionality. Until now, you had to upload copies of the same image to all translations, in order for it to appear.<\/p>\n<p>The new <strong>WPML Media Translation<\/strong> plugin solves this in a slick way. Without wasting space on the server and without limiting your flexibility, you can now have the same images for all languages, or specific images for each translation.<\/p>\n<h2>Background &#8211; How WordPress Attachments Work<\/h2>\n<p>When you upload a file (image, video, podcast, etc.), WordPress saves it in the <strong>uploads<\/strong> directory. It also adds a record to the database that says <em>File X<\/em> belongs to <em>Post Y<\/em>. This record is called an <strong>attachment<\/strong>.<\/p>\n<p>When you insert the Gallery short tag to a post, WordPress looks for all the attachments that belong to that post and displays them nicely together.<\/p>\n<p>For galleries to display the same images on translated posts, the images on the disk don&#8217;t require duplication. We only need to duplicate the <strong>attachment<\/strong> records. This is exactly what <strong>WPML Media Translation<\/strong> does.<\/p>\n<h2>Duplicating Images for Existing Posts<\/h2>\n<p>After you enable WPML Media Translation, you&#8217;ll see a message offering you to complete the setup. Visit the setup page to automatically copy attachments from posts in the original language to translations.<\/p>\n<p><strong>Note: it&#8217;s not a fully symmetrical process. WPML will only copy attachments from the default language to the other languages.<\/strong><\/p>\n<figure id=\"attachment_7462\" aria-describedby=\"caption-attachment-7462\" style=\"width: 300px\" class=\"wp-caption alignnone\"><a href=\"http:\/\/wpml.org\/wp-content\/uploads\/2011\/05\/media-translations-admin.png\"><img decoding=\"async\" class=\"size-medium wp-image-7462 \" title=\"media-translations-admin\" src=\"http:\/\/wpml.org\/wp-content\/uploads\/2011\/05\/media-translations-admin-300x95.png\" alt=\"\" width=\"300\" height=\"95\" srcset=\"https:\/\/wpml.org\/wp-content\/uploads\/2011\/05\/media-translations-admin-300x95.png 300w, https:\/\/wpml.org\/wp-content\/uploads\/2011\/05\/media-translations-admin-150x47.png 150w, https:\/\/wpml.org\/wp-content\/uploads\/2011\/05\/media-translations-admin.png 656w\" sizes=\"(max-width: 300px) 100vw, 300px\" \/><\/a><figcaption id=\"caption-attachment-7462\" class=\"wp-caption-text\">Admin menu for WPML Media Translation<\/figcaption><\/figure>\n<p>And that&#8217;s all. WPML will run through all your site&#8217;s content and duplicate all attachments to the translations. Remember that since we&#8217;re only duplicating database entries, this doesn&#8217;t increase your site&#8217;s disk space.<\/p>\n<h2>Duplicating Images for New Posts<\/h2>\n<p>The post editor will include a new checkbox that says <strong>Duplicate uploaded media to translations<\/strong>. When checked, WPML will automatically copy the attachments you add to the default language, to all translations.<\/p>\n<figure id=\"attachment_7465\" aria-describedby=\"caption-attachment-7465\" style=\"width: 300px\" class=\"wp-caption alignnone\"><a href=\"http:\/\/wpml.org\/wp-content\/uploads\/2011\/05\/duplicate-attachments.png\"><img decoding=\"async\" class=\"size-medium wp-image-7465\" title=\"duplicate-attachments\" src=\"http:\/\/wpml.org\/wp-content\/uploads\/2011\/05\/duplicate-attachments-300x202.png\" alt=\"\" width=\"300\" height=\"202\" srcset=\"https:\/\/wpml.org\/wp-content\/uploads\/2011\/05\/duplicate-attachments-300x202.png 300w, https:\/\/wpml.org\/wp-content\/uploads\/2011\/05\/duplicate-attachments-150x101.png 150w, https:\/\/wpml.org\/wp-content\/uploads\/2011\/05\/duplicate-attachments.png 383w\" sizes=\"(max-width: 300px) 100vw, 300px\" \/><\/a><figcaption id=\"caption-attachment-7465\" class=\"wp-caption-text\">Checkbox for controlling attachments duplication<\/figcaption><\/figure>\n<p>The order of operations doesn&#8217;t really matter. When there are new attachments, they&#8217;re copied. Also, when you create new translations, they get all the attachments from the default language.<\/p>\n<p>There&#8217;s a similar checkbox next to the <strong>Featured Image<\/strong>, to duplicate it too onto translations.<\/p>\n<h2>Choosing Media per Language<\/h2>\n<p>This new attachments-duplication makes WordPress media language-aware. You can have the same physical image file associated with posts in different languages.<\/p>\n<p>When you click on the <strong>Insert Image<\/strong> button, in the post editor, WordPress will show you images in the post&#8217;s language. You&#8217;ll find a new language selector to choose images that belong to posts in other languages too.<\/p>\n<figure id=\"attachment_7466\" aria-describedby=\"caption-attachment-7466\" style=\"width: 300px\" class=\"wp-caption alignnone\"><a href=\"http:\/\/wpml.org\/wp-content\/uploads\/2011\/05\/language-switcher-for-media-insert.png\"><img decoding=\"async\" class=\"size-medium wp-image-7466\" title=\"language-switcher-for-media-insert\" src=\"http:\/\/wpml.org\/wp-content\/uploads\/2011\/05\/language-switcher-for-media-insert-300x212.png\" alt=\"\" width=\"300\" height=\"212\" srcset=\"https:\/\/wpml.org\/wp-content\/uploads\/2011\/05\/language-switcher-for-media-insert-300x212.png 300w, https:\/\/wpml.org\/wp-content\/uploads\/2011\/05\/language-switcher-for-media-insert-150x106.png 150w, https:\/\/wpml.org\/wp-content\/uploads\/2011\/05\/language-switcher-for-media-insert.png 702w\" sizes=\"(max-width: 300px) 100vw, 300px\" \/><\/a><figcaption id=\"caption-attachment-7466\" class=\"wp-caption-text\">Language selector for media insert<\/figcaption><\/figure>\n<p>And, last but not least, when you visit the Media menu, you&#8217;ll also see the uploaded media per language.<\/p>\n<p>To switch languages, use the Admin Bar language switcher, available in WPML 2.3.0 and above (for now, you can use the Beta version).<\/p>\n<figure id=\"attachment_7468\" aria-describedby=\"caption-attachment-7468\" style=\"width: 300px\" class=\"wp-caption alignnone\"><a href=\"http:\/\/wpml.org\/wp-content\/uploads\/2011\/05\/languages-in-media-screen.png\"><img decoding=\"async\" class=\"size-medium wp-image-7468\" title=\"languages-in-media-screen\" src=\"http:\/\/wpml.org\/wp-content\/uploads\/2011\/05\/languages-in-media-screen-300x263.png\" alt=\"\" width=\"300\" height=\"263\" srcset=\"https:\/\/wpml.org\/wp-content\/uploads\/2011\/05\/languages-in-media-screen-300x263.png 300w, https:\/\/wpml.org\/wp-content\/uploads\/2011\/05\/languages-in-media-screen-150x131.png 150w, https:\/\/wpml.org\/wp-content\/uploads\/2011\/05\/languages-in-media-screen.png 615w\" sizes=\"(max-width: 300px) 100vw, 300px\" \/><\/a><figcaption id=\"caption-attachment-7468\" class=\"wp-caption-text\">Language switcher in the Media screen<\/figcaption><\/figure>\n<h2>Summary<\/h2>\n<p>This plugin adds language switching to all the WordPress media management. It makes attachments language-aware and allows to easily synchronize images between translations.<\/p>\n<p>All you need to do to make this happen is enable the <strong>Duplicate uploaded media to translations<\/strong>\u00a0checkbox in the post editor. The rest happens by itself.<\/p>\n<p><strong>To download, login to your WPML.org account.<\/strong> This new plugin is available for both the <strong>Multilingual Blog<\/strong> and <strong>Multilingual CMS<\/strong> packages.<\/p>\n<p>Enjoy!<\/p>\n<p>&nbsp;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Do you have trouble duplicating images and other media between languages? You&#8217;re not alone. It&#8217;s always been a problem and now it&#8217;s solved. Many themes, especially those designed for photographers and artists, rely heavily on the WordPress Gallery functionality. Until now, you had to upload copies of the same image to all translations, in order [&hellip;]<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_bbp_topic_count":0,"_bbp_reply_count":0,"_bbp_total_topic_count":0,"_bbp_total_reply_count":0,"_bbp_voice_count":0,"_bbp_anonymous_reply_count":0,"_bbp_topic_count_hidden":0,"_bbp_reply_count_hidden":0,"_bbp_forum_subforum_count":0,"ep_exclude_from_search":false,"footnotes":""},"categories":[48],"tags":[],"class_list":["post-7455","post","type-post","status-publish","format-standard","hentry","category-changelog"],"_links":{"self":[{"href":"https:\/\/wpml.org\/es\/wp-json\/wp\/v2\/posts\/7455","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/wpml.org\/es\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/wpml.org\/es\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/wpml.org\/es\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/wpml.org\/es\/wp-json\/wp\/v2\/comments?post=7455"}],"version-history":[{"count":8,"href":"https:\/\/wpml.org\/es\/wp-json\/wp\/v2\/posts\/7455\/revisions"}],"predecessor-version":[{"id":1074953,"href":"https:\/\/wpml.org\/es\/wp-json\/wp\/v2\/posts\/7455\/revisions\/1074953"}],"wp:attachment":[{"href":"https:\/\/wpml.org\/es\/wp-json\/wp\/v2\/media?parent=7455"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/wpml.org\/es\/wp-json\/wp\/v2\/categories?post=7455"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/wpml.org\/es\/wp-json\/wp\/v2\/tags?post=7455"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}