WPML comes with a built-in function allowing you to duplicate files under the Media Library for multiple languages.
Here’s what WPML does:
- The plugin keeps the same file URL (instead of duplicating the file) but changes the file ID across different languages.
- That means one file URL could be having as many as 3 different IDs stored in the database
While that process might be optimal for them, it’s rather difficult for our plugin to protect these files properly.
Requirement: PDA Gold version 3.1.5 and above
Since version 3.1.5, our PDA Gold is now compatible with WPML. The file protection and Access Permission now work consistently across different languages.
PDA Gold & WPML: Integration Logic
- You can protect and configure file protection, i.e. set the File Access Permission, under the default language only
- When you upload a new file under other languages, you won’t be able to protect them. You have to switch to the main language first.
- Once a file is (un)protected, all its copies under sub-languages will be protected too.
- In other words, the protection status and File Access Permission will follow the one under default language
Please note that when WPML is deactivated, media files under multiple languages will be moved back into one place. As a result, your file uploads will appear “duplicated” under Media Library. Protecting one file will cause “missing file” error for the others because they all share the same file URL as mentioned above.