Search results

Localization in JavaScript (ES5) FileManager control

The file manager can be localized to any culture by defining the texts and messages of the file manager in the corresponding culture. The default locale of the file manager is en (English). The following table represents the default texts and messages of the file manager in en culture.

KEY Text/Message
NewFolder New folder
Upload Upload
Delete Delete
Rename Rename
Download Download
Cut Cut
Copy Copy
Paste Paste
SortBy Sort by
Refresh Refresh
Item-Selection item selected
Items-Selection items selected
View View
Details Details
SelectAll Select all
Open Open
Tooltip-NewFolder New folder
Tooltip-Upload Upload
Tooltip-Delete Delete
Tooltip-Rename Rename
Tooltip-Download Download
Tooltip-Cut Cut
Tooltip-Copy Copy
Tooltip-Paste Paste
Tooltip-SortBy Sort by
Tooltip-Refresh Refresh
Tooltip-Selection Clear selection
Tooltip-View View
Tooltip-Details Details
Tooltip-SelectAll Select all
Name Name
Size Size
DateModified Modified
DateCreated Date created
Path Path
Created Created
Modified Modified
Location Location
Type Type
Ascending Ascending
Descending Descending
View-LargeIcons Large icons
View-Details Details
Search Search
Button-Ok OK
Button-Cancel Cancel
Button-Yes Yes
Button-No No
Button-Create Create
Button-Save Save
Header-NewFolder Folder
Content-NewFolder Enter your folder name
Header-Rename Rename
Content-Rename Enter your new name
Header-Rename-Confirmation Rename Confirmation
Content-Rename-Confirmation If you change a file name extension
Header-Delete Delete File
Content-Delete Are you sure you want to delete this file?
Header-Multiple-Delete Delete Multiple Files
Content-Multiple-Delete Are you sure you want to delete these {0} files?
Header-Duplicate File exists
Content-Duplicate already exists. Are you sure you want to replace it?
Header-Upload Upload Files
Error Error
Validation-Empty The file or folder name cannot be empty.
Validation-Invalid The file or folder name {0} contains invalid characters. Please use a different name. Valid file or folder names cannot end with a dot or space, and cannot contain any of the following characters: \/:*?”<>|
Validation-NewFolder-Exists A file or folder with the name {0} already exists.
Validation-Rename-Exists Cannot rename {0} to {1}
Folder-Empty This folder is empty
File-Upload Drag files here to upload
Search-Empty No results found
Search-Key Try with different keywords
Sub-Folder-Error The destination folder is the subfolder of the source folder
Access-Denied Access Denied
Access-Details You don’t have permission to access this folder
Header-Retry File Already Exists
Content-Retry A file with this name already exists in this folder. What would you like to do?
Button-Keep-Both Keep both
Button-Replace Replace
Button-Skip Skip
ApplyAll-Label Do this for all current items

The below example shows adding the German culture locale(de-DE)

Source
Preview
index.js
index.html
//Defining texts and messages corresponding to German culture
ej.base.L10n.load({
    'de': {
        'filemanager': {
            "NewFolder": "Neuer Ordner",
            "Upload": "Hochladen",
            "Delete": "Löschen",
            "Rename": "Umbenennen",
            "Download": "Herunterladen",
            "Cut": "Schnitt",
            "Copy": "Kopieren",
            "Paste": "Einfügen",
            "SortBy": "Sortiere nach",
            "Refresh": "Aktualisierung",
            "Item-Selection": "Element ausgewählt",
            "Items-Selection": "Elemente ausgewählt",
            "View": "Aussicht",
            "Details": "Einzelheiten",
            "SelectAll": "Wählen Sie Alle",
            "Open": "Öffnen",
            "Tooltip-NewFolder": "Neuer Ordner",
            "Tooltip-Upload": "Hochladen",
            "Tooltip-Delete": "Löschen",
            "Tooltip-Rename": "Umbenennen",
            "Tooltip-Download": "Herunterladen",
            "Tooltip-Cut": "Schnitt",
            "Tooltip-Copy": "Kopieren",
            "Tooltip-Paste": "Einfügen",
            "Tooltip-SortBy": "Sortiere nach",
            "Tooltip-Refresh": "Aktualisierung",
            "Tooltip-Selection": "Auswahl löschen",
            "Tooltip-View": "Aussicht",
            "Tooltip-Details": "Einzelheiten",
            "Tooltip-SelectAll": "Wählen Sie Alle",
            "Name": "Name",
            "Size": "Größe",
            "DateModified": "Datum geändert",
            "DateCreated": "Datum erstellt",
            "Path": "Pfad",
            "Modified": "Geändert",
            "Created": "Erstellt",
            "Location": "Ort",
            "Type": "Art",
            "Ascending": "Aufsteigend",
            "Descending": "Absteigend",
            "View-LargeIcons": "Große Icons",
            "View-Details": "Einzelheiten",
            "Search": "Suche",
            "Button-Ok": "OK",
            "Button-Cancel": "Stornieren",
            "Button-Yes": "Ja",
            "Button-No": "Nein",
            "Header-NewFolder": "Ordner erstellen",
            "Content-NewFolder": "Geben Sie einen Namen für den neuen Ordner ein:",
            "Header-Rename": "Artikel umbenennen",
            "Content-Rename": "Geben Sie einen neuen Namen für den Artikel ein:",
            "Header-Rename-Confirmation": "Bestätigung umbenennen",
            "Content-Rename-Confirmation": "Wenn Sie die Dateinamenerweiterung ändern, wird die Datei möglicherweise instabil. Möchten Sie sie wirklich ändern?",
            "Header-Delete": "Datei löschen",
            "Content-Delete": "Möchten Sie diese Datei wirklich löschen?",
            "Header-Multiple-Delete": "Mehrere Dateien löschen",
            "Content-Multiple-Delete": "Möchten Sie diese {0} -Dateien wirklich löschen?",
            "Header-Duplicate": "Datei existiert",
            "Content-Duplicate": "ist bereits vorhanden. Möchten Sie es wirklich ersetzen?",
            "Error": "Error",
            "Header-Upload": "Daten hochladen",
            "Validation-Empty": "Dateiname darf nicht leer sein!",
            "Validation-Invalid": "Dateiname darf keines der folgenden Zeichen enthalten: \\ /: *? \" <> | ",
            "Validation-NewFolder-Exists": "Eine Datei oder ein Ordner mit dem Namen {0} ist bereits vorhanden.",
            "Validation-Rename-Exists": "{0} kann nicht in {1} umbenannt werden",
            "Folder-Empty": "Dieser Ordner ist leer",
            "File-Upload": "Dateien zum Hochladen hierher ziehen",
            "Search-Empty": "Keine Ergebnisse gefunden",
            "Search-Key": "Versuchen Sie es mit anderen Suchbegriffen"
        }
    }
})

var hostUrl = 'https://ej2-aspcore-service.azurewebsites.net/';
// inject feature modules of the file manager
ej.filemanager.FileManager.Inject(ej.filemanager.DetailsView,ej.filemanager.Toolbar,ej.filemanager.NavigationPane);
// initialize File Manager component
var filemanagerInstance = new ej.filemanager.FileManager({
    ajaxSettings: {
        url: hostUrl + 'api/FileManager/FileOperations',
        getImageUrl: hostUrl + 'api/FileManager/GetImage',
        uploadUrl: hostUrl + 'api/FileManager/Upload',
        downloadUrl: hostUrl + 'api/FileManager/Download'
    },
    //defining the locale for File Manager
    locale: 'de'
});

// render initialized File Manager
filemanagerInstance.appendTo('#filemanager');
<!DOCTYPE html><html lang="en"><head>
    <title>Essential JS 2 File Manager</title>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta name="description" content="Essential JS 2 File Manager Component">
    <meta name="author" content="Syncfusion">
    <link href="index.css" rel="stylesheet">
    <link href="//cdn.syncfusion.com/ej2/ej2-base/styles/material.css" rel="stylesheet">
    <link href="//cdn.syncfusion.com/ej2/ej2-inputs/styles/material.css" rel="stylesheet">
    <link href="//cdn.syncfusion.com/ej2/ej2-popups/styles/material.css" rel="stylesheet">
    <link href="//cdn.syncfusion.com/ej2/ej2-buttons/styles/material.css" rel="stylesheet">
    <link href="//cdn.syncfusion.com/ej2/ej2-splitbuttons/styles/material.css" rel="stylesheet">
    <link href="//cdn.syncfusion.com/ej2/ej2-layouts/styles/material.css" rel="stylesheet">
    <link href="//cdn.syncfusion.com/ej2/ej2-navigations/styles/material.css" rel="stylesheet">
    <link href="//cdn.syncfusion.com/ej2/ej2-grids/styles/material.css" rel="stylesheet">
    <link href="//cdn.syncfusion.com/ej2/ej2-filemanager/styles/material.css" rel="stylesheet">
    
    
<script src="https://cdn.syncfusion.com/ej2/dist/ej2.min.js" type="text/javascript"></script>
</head>
<body>
    
    <div id="filemanager"></div>

<script>
var ele = document.getElementById('container');
if(ele) {
    ele.style.visibility = "visible";
 }   
        </script>
<script src="index.js" type="text/javascript"></script>
</body></html>