JeremyFagis / dropify

Override your input files with style — Demo here : http://jeremyfagis.github.io/dropify
MIT License
974 stars 399 forks source link

How can use options to translate errors message #85

Open ingpedroaraujo opened 6 years ago

ingpedroaraujo commented 6 years ago

I have this:

$('.dropify').dropify({

        messages: {
            'default': 'Arrastre la imagen aquí',
            'replace': 'Arrastre la imagen o haga clic para reemplazar',
            'remove':  'Quitar',
            'error':   'Ooops, ha ocurrido un error.'
        },
        error: {
            'fileSize': 'Demasiado grande ({{ value }} max).',
            'minWidth': 'Ancho demasiado pequeño (min {{ value }}}px).',
            'maxWidth': 'Ancho demasiado grande (max {{ value }}}px).',
            'minHeight': 'Alto demasiado pequeño (min {{ value }}}px).',
            'maxHeight': 'Alto demasiado grande (max {{ value }}px max).',
            'imageFormat': 'Formato no permitido, sólo ({{ value }}).'
        }

    });

But when I run it, I get this error: Use of undefined constant value - assumed 'value' (this will throw an Error in a future version of PHP)

I think it's about the options init, but I dont know how to send the options. Can you help me?