Polylang comes with a built-in function allowing you to duplicate files under the Media Library for multiple languages.
Here’s what Polylang 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.3.0 and greater
Since version 3.3.0, our PDA Gold is compatible with Polylang. The file protection and access permission now work consistently across different languages.
PDA Gold & Polylang: 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 (un)protected too.
- In other words, the protection status and File Access Permission will follow the one under default language
Please note that when Polylang 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 a “missing file” error for the others because they all share the same file URL as mentioned above.