i18n.remove.confirm

Since: Editor 1.0

Row deletion confirmation message.
Please note - this property requires the Editor extension for DataTables.

Description

As Editor has the ability to delete either a single or multiple rows at a time, this option can be given as either a string (which will be used regardless of how many records are selected) or as an object where the property _ will be used (with %d substituted for the number of records to be deleted) as the delete message, unless there is a key with the number of records to be deleted. This allows Editor to consider the different pluralisation characteristics of different languages.

This option is only used as part of the remove button that Editor makes available to the Buttons extension for DataTables. If you are not using Buttons, the language strings presented to the end user can be configured through the API methods such as title() and buttons().

For legacy installations using TableTools, the editor_remove button type also makes use of this option.

Type

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

Examples

String - no plural consideration:

var editor = new DataTable.Editor({
	ajax: 'php/staff.php',
	table: '#myTable',
	i18n: {
		remove: {
			confirm: 'Are you sure you wish to delete %d record(s)?'
		}
	}
});

Basic 1 (singular) or _ (plural):

var editor = new DataTable.Editor({
	ajax: 'php/staff.php',
	table: '#myTable',
	i18n: {
		remove: {
			confirm: {
				_: 'Confirm deletion of %d records.',
				1: 'Confirm deletion of record.'
			}
		}
	}
});

Singular, dual and plural:

var editor = new DataTable.Editor({
	ajax: 'php/staff.php',
	table: '#myTable',
	i18n: {
		remove: {
			confirm: {
				_: 'Confirm deletion of %d records.',
				1: 'Confirm deletion of record.',
				2: 'Confirm deletion of both record.'
			}
		}
	}
});

Use French language strings for the remove button:

var editor = new DataTable.Editor({
	ajax: 'php/staff.php',
	table: '#myTable',
	i18n: {
		remove: {
			button: 'Supprimer',
			title: 'Supprimer',
			submit: 'Supprimer',
			confirm: {
				_: 'Etes-vous sûr de vouloir supprimer %d lignes?',
				1: 'Etes-vous sûr de vouloir supprimer 1 ligne?'
			}
		}
	}
});

Related

The following options are directly related and may also be useful in your application development.