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.
This topic contains 4 replies, has 2 voices.
Last updated by Tom Martin 1 year, 7 months ago.
Assisted by: Nigel.
Author | Posts |
---|---|
May 25, 2023 at 12:26 pm #13716175 | |
Tom Martin |
Hello, I have issue with imported media with gravity form. Users adding pictures on form theya are added to the media and it auto duplicated to all languages. |
May 29, 2023 at 8:49 am #13729965 | |
Nigel Supporter Timezone: Europe/Madrid (GMT+01:00) |
Hi there Can you please clarify how your form is set up? Specifically, what type of form field are you using for uploading the images? Gravity Forms includes a "Post image" field for forms that will create posts, but in your question you said that the images are not part of any article. So the alternative would be the file upload field, but that does not add the files to the Media library. Assuming that you must, therefore, be using the Post Image field (which would mean the images are post attachments), you can change whether other language versions are automatically made with the global settings at WPML > Settings > Media Translation. You will want to un-check each of the options shown in the screenshot. Again, assuming these are media attachments visible in the WordPress media library, then you can delete them from there, and have the translations of the media deleted automatically at the same time. For that you need the setting at WPML > Settings > Posts and pages synchronization for "When deleting a post, delete translations as well" checked. |
May 29, 2023 at 2:15 pm #13733203 | |
Tom Martin |
Hello, |
May 30, 2023 at 9:45 am #13737753 | |
Nigel Supporter Timezone: Europe/Madrid (GMT+01:00) |
Hello again Sorry, I am struggling to understand exactly what you need. Let me talk through what happens when you upload images to the media library in a multilingual context. Uploading an image to the media library adds the physical file to the wp-content/uploads folder on your server, and it creates a post, of post type "attachment". WPML will record the language information of that attachment post. If you have the media setting "When uploading media to the Media library, make it available in all languages" checked, the WPML will also create a new attachment post for each additional language on your site. If your site had only two languages, e.g. German and French, then there would be two attachment posts, one for each language, and if you browse the media library you would see both images when using the language switcher in the admin toolbar to switch between languages. Note that there is still only one image file in the wp-content/uploads folder though, both languages point to the same image. The other two settings "Duplicate media attachments for translations" and "Duplicate featured images for translations" determine whether when translating a post it should include the images in the translations. If you have the "When uploading media to the Media library, make it available in all languages" setting checked then the other language versions of the attachments already exist and it is just a question of whether translated posts should include them automatically or not. These settings all relate to new content and have no effect on existing content. Hopefully that can help you understand what is involved and determine the best settings for your use case. It sounds like you have users submit entries with images, and then you use those entries and images to create articles yourself. In which case it sounds like you do want translations of the uploaded attachment posts to be able to use them in your articles, and this is where I get confused about why you would then want to delete the images or the translations of them. |