core
core copied to clipboard
Add Support for Multi-language Files
We need to handle the following for Files, being "Files" content whose content type is of type "File" (e.g. FileAsset, Video, Document):
- [x] 1. Language different than default language can be used for creating new Files
- [x] 2. A new version of an existing File can be created in a different language
- [x] 3. If image, the Edit Image functionality needs to respect the chosen language
- [x] 4. If text, the Edit Text functionality needs to respect the chosen language
- [x] 5. In the Edit Content Screen, Resource link needs to include and support the chosen language (see https://github.com/dotCMS/core/issues/8932)
- [x] 6. Have the ability to default files to default language, same as we do for others (page,content,widget).See https://github.com/dotCMS/core/blob/8c672dd853a7883ad00d7b629e05f113d7fc5f1f/src-conf/dotmarketing-config.properties#L22-L22
- [x] 7. Request to a File needs to accept language id. (SpeedyAssetServlet. see https://github.com/dotCMS/core/issues/8932). Use languageid instead of WebKeys.HTMLPAGELANGUAGE
- [x] 8. Resource link (Edit Content Screen) needs to show the url with the proper language (if not default, e.g. /images/icons/app-store.png?language_id=2)
- [x] 9. Language dropdown needs to show up in New/Edit Content screen
- [x] 10. Language icon needs to be shown for Files in the Site Browser (same as pages) (done here https://github.com/dotCMS/core/commit/2b88d647787912f97596bfccc0cb962e29f939d6, please check)
- [x] 11. Site Brower's language dropdown filter needs to apply to Files properly
this is related: https://github.com/dotCMS/core/issues/9139
PR https://github.com/dotCMS/core/pull/9194
Documented: http://auth.dotcms.com/docs/latest/files-multilingual
Passed QA. Fix meets all 11 points in Acceptance Criteria Tested locally in: master-3.6 // Mac OS 10.10 // MySQL 5.6.23 // Chrome & Firefox