This is a migrated thread and some comments may be shown as answers.

"Done" label localization

4 Answers 333 Views
Upload
This is a migrated thread and some comments may be shown as answers.
Kruno
Top achievements
Rank 1
Kruno asked on 19 Aug 2013, 10:06 AM
Hi,

I have a Razor ASP.NET MVC view with kendo upload function in to

@(Html.Kendo().Upload()
                        .Name("attachment")
                        .Async(a => a
                            .Save("SaveUserPicture", "Upload")
                            .Remove("RemoveUserPicture", "Upload")
                            .AutoUpload(false)
                    )
            .Multiple(false)
            .Events(e => e.Success("onUploadComplete"))
            .Events(e => e.Select("onSelect"))
            .Messages(m => m.StatusUploading("1"))
            .Messages(m => m.StatusUploaded("2"))
            .Messages(m => m.Select("3"))
            .Messages(m => m.Cancel("4"))
            .Messages(m => m.UploadSelectedFiles("5"))
            .Messages(m => m.DropFilesHere("6"))
            .Messages(m => m.Retry("7"))
            .Messages(m => m.StatusFailed("8"))
            .Messages(m => m.Remove("9"))
        )

How can I change the label "Done" ?
As you can see I've tried all labels but it doesn't work.

Kind regards,
Kruno

4 Answers, 1 is accepted

Sort by
0
Dimiter Madjarov
Telerik team
answered on 20 Aug 2013, 06:00 PM
Hi Kruno,


This is a quote from my answer in the support thread:

Sorry for the caused inconvenience. Indeed this is a bug in the MVC Wrappers, since the new localization properties are not yet exposed there. This is already logged for fixing and the documentation will be updated. As a temporary workaround you could use the following code snippet to set the localization options when the widget is initialized.
E.g.
$(function () {
    var upload = $("#attachment").data("kendoUpload");
    $.extend(upload.options.localization, {
        headerStatusUploading: "custom1",
        headerStatusUploaded: "custom2"
    });
});



 

Regards,
Dimiter Madjarov
Telerik
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
0
Artem
Top achievements
Rank 1
answered on 23 Feb 2018, 04:53 AM

I'am use MVC5 and telerik.ui.for.aspnetmvc.2018.1.221.trial.

Iam paste code:

@(Html.Kendo().Upload()
                          .Name("file")
                          .HtmlAttributes(new { aria_label = "files" })
                          .Messages(a => a.StatusUploading("загружается")
                                          .StatusUploaded("успешно загружен")
                                          .StatusFailed("Произошла ошибка при загрузке"))
                          .Async(a => a.Save("CreateByExcel", "Upload")
                                       .AutoUpload(true))
                  )

label "Done" still appears. Bug don't fixing???

0
Dimitar
Telerik team
answered on 26 Feb 2018, 09:22 AM
Hello Artem,

The Done label is inside the Upload header and its localization is controlled with the HeaderStatusUploading and HeaderStatusUploaded properties.
The properties StatusUploaded and StatusFailed set the text of a span with class k-file-state for an uploaded file, but this span is hidden by the widget styles - screenshot.

Regards,
Dimitar
Progress Telerik
Try our brand new, jQuery-free Angular components built from ground-up which deliver the business app essential building blocks - a grid component, data visualization (charts) and form elements.
0
Artem
Top achievements
Rank 1
answered on 27 Feb 2018, 04:23 AM
Thanks!!!
Tags
Upload
Asked by
Kruno
Top achievements
Rank 1
Answers by
Dimiter Madjarov
Telerik team
Artem
Top achievements
Rank 1
Dimitar
Telerik team
Share this question
or