FileManager: How to localize the default name of new folders?

1 Answer 35 Views
FileManager Localization
Patrick
Top achievements
Rank 1
Iron
Patrick asked on 23 May 2021, 11:43 PM

Dear Sir or Madam,

FileManager: When I click the "New Folder" toolbar button, a new folder is created (called "New Folder"). I would like to know, if and how it is possible to localize the default name of new folders? Unfortunately, this is not mentioned in your documentation.

Is it possible to localize the default name of a new folder? (e.g. to its German translation "Neuer Ordner")

I look forward to your reply!

Yours sincerely,

Patrick

1 Answer, 1 is accepted

Sort by
1
Accepted
Martin
Telerik team
answered on 26 May 2021, 11:55 AM

Hello, Patrick,

You can change the default value for the newly created folder by overriding the FileManager schema as below:

kendo.data.schemas.filemanager = {

          model: {
            id: "path",
            hasChildren: "hasDirectories",
            fields: {
              name: {field: "name", editable: true, type: "string", defaultValue: "Neuer Ordner" },
              size: {field: "size", editable: false, type: "number"},
              path: {field: "path", editable: false, type: "string"},
              extension: {field: "extension", editable: false, type: "string"},
              isDirectory: {field: "isDirectory", editable: false, defaultValue: true, type: "boolean"},
              hasDirectories: {field: "hasDirectories", editable: false, defaultValue: false, type: "boolean"},
              created: {field: "created", type: "date", editable: false},
              createdUtc: {field: "createdUtc", type: "date", editable: false },
              modified: {field: "modified", type: "date", editable: false},
              modifiedUtc: {field: "modifiedUtc", type: "date", editable: false }
            }
          }

        }

Here is a small example for reference.

Let me know if you have any further questions.

Regards,
Martin
Progress Telerik

Love the Telerik and Kendo UI products and believe more people should try them? Invite a fellow developer to become a Progress customer and each of you can get a $50 Amazon gift voucher.

Tags
FileManager Localization
Asked by
Patrick
Top achievements
Rank 1
Iron
Answers by
Martin
Telerik team
Share this question
or