i18n.field.uploadMany

Since: Editor 2.4

Defaults for the strings used by uploadMany fields.
Please note - this property requires the Editor extension for DataTables.

Description

This object provides a container for the strings used by the uploadMany field type. Each string can be set directly on the field's object (see the i18n option of upload), but can also be set here to have a default value. This is particularly useful when providing a full translation for Editor and you are happy with the generic terms for the field type.

It is worth highlighting that Editor's language strings can be loaded from the JSON language object that DataTables loads during its startup (language). That allows a single file to provide a full translation for DataTables and Editor.

The following properties can be set on this object.

  • choose - Text shown on the input button for the file input (i.e. where the user clicks to get the file picker dialogue). The default text is Choose file....
  • dragDrop - Text shown in the zone where the end user can drag a file to, to start an upload. The default text is Drag and drop a file here to upload.
  • noFile - Shown in the file area when there is no value for the field. The default is No files.
  • processing - Shown in place of choose in the input when a file is being readied for upload. The default is Processing.
  • uploading - Shown in place of choose in the input when a file is being uploaded. The defailt is Uploading file.

Type

This option can be given in the following type(s):

Example

Use French language strings for upload files:

let editor = new DataTable.Editor({
	i18n: {
		field: {
			upload: {
				choose: 'Choisir le fichier...',
				clear: '',
				dragDrop: 'Glisser-déposer un fichier ici pour le télécharger',
				noFile: 'Aucun dossier',
				processing: 'Traitement',
				uploading: 'Téléchargement d'un fichier'
			}
		}
	},
	// ...
});