tomitrescak / meteor-uploads

MIT License
295 stars 41 forks source link

how do internationalize the drop zone text ? #172

Closed tomvolek closed 8 years ago

tomvolek commented 9 years ago

how do internationalize the drop zone text ? "Drop files Here"

Thanks

tomitrescak commented 8 years ago

Sorry for a veery late repsonse! Was not possible until now. All you have to do is:

if (Meteor.isClient) {
  Uploader.localisation.dropFiles = "Aqui!";
}
tomvolek commented 8 years ago

thanks Tom. worked like a charm , great module.   A question suggestion , I am using this to drop images to this directory.  How can i get a thumbnail of the image I am dropping ?  I need to display thumbnails in a table cell.  Regards

 On Tuesday, November 17, 2015 4:56 PM, Tomas Trescak <notifications@github.com> wrote:

Closed #172.— Reply to this email directly or view it on GitHub.

tomitrescak commented 8 years ago

Tom, there are several options. You ca either use validate callback on client that is triggered before the upload to server. Or you can use finished callback which returns a url of the uploaded image sso that you can display it wherever necessary.

tomvolek commented 8 years ago

HI Tom :   Sorry to bug you .  I was trying to internationalize the drop zone.  Your hint in previous email, seem to work, but all of a sudden its not working. if (Meteor.isClient) { Uploader.localisation.dropFiles = "Aqui!"; } I have a a drop down menu , which the user will select the language of choice . I also tried to use the following.   But don't see language for drop zone or Uploader object texts to change .  Any idea ?    I have added the following to the isClient {}  section.  

Template.i18n_dropdown_bootstrap3_component.events({ 'click a.language-selector': function (event) {Uploader.localisation = { dropFiles : "رها کردن فایل ها در اینجا", browse: "فهرست", cancelled: "لغو شد", remove: "برداشتن", upload: "آپلود", done: "انجام شده", cancel: "لغو" }

Thanks On Tuesday, November 17, 2015 4:56 PM, Tomas Trescak notifications@github.com wrote:

Sorry for a veery late repsonse! Was not possible until now. All you have to do is:if (Meteor.isClient) { Uploader.localisation.dropFiles = "Aqui!"; } — Reply to this email directly or view it on GitHub.