Enables multi-lingual file upload attributes in October CMS
Translate plugin must be installed first
Download the repo, move it inside the plugins/glitchbone/filetranslate
folder and register the plugin with October CMS :
php artisan october:up
Use Glitchbone\FileTranslate\Models\File
in your model attachment configuration :
public $attachOne = [
'thumbnail' => 'Glitchbone\FileTranslate\Models\File'
];
public $attachMany = [
'photos' => 'Glitchbone\FileTranslate\Models\File'
];
Use the mlfileupload
form widget in your model fields.yaml :
thumbnail:
label: Thumbnail
type: mlfileupload
mode: image
imageWidth: 200
imageHeight: 200
photos:
label: Photo gallery
type: mlfileupload
mode: image
imageWidth: 200
imageHeight: 200
File translation plugin is available under the MIT license. See the LICENSE file for more information.