Problem translating media in a loop
-
Hi,
I am trying to translate all my images from english to french in a loop (I inpired myself with your translate_media function).
That works almost ok but on the media admin page (in the list view):
– the original file look great -> with a tick symbol below the english flag, and a pencil below the french flag.
– the translated file have to tick symbols.. and so they are not linked correctly.I think this is because your translate media function create a new attachment, but without clearing the post fields (see the code below)
// create a new attachment (translate attachment parent if exists) $post->ID = null; // will force the creationI would like to clear the english information from the newly created item, however I have no idea how to do that?
Could you help please?
Best Regards,
The topic ‘Problem translating media in a loop’ is closed to new replies.