{hero}

language.searchPanes.title

Since: SearchPanes 1.0.0

Add internationalisation to the title showing how many panes are selected.
Please note - this property requires the SearchPanes extension for DataTables.

Description

SearchPanes will set the title to display the number of filters in the style of the following 'Filters Active - %d'. This property allows that message to be configured.

It is a global setting that will impact all instances of SearchPanes on a DataTable (it should be noted that it is uncommon to have more than one instance!). The per-instance parameter is searchPanes.i18n.title, which also defines the default.

This option is useful as the language object can be loaded by Ajax, or set locally and define all language strings used by DataTables and its extensions.

Types

string

Description:

As standard searchPanes.i18n.title is simply a string that contains a replacement for the number of selections that have been made.

object

Description:

It is possible to set the value of searchPanes.i18n.title to an object that would allow for the actual text to also change as the number of selections increases.

Default

  • Value: Filters Active - %d

The default value for the searchPanes.i18n.title parameter is Filters Active - %d.

Examples

Alter title messages with an object:

new DataTable('#myTable', {
	language: {
		searchPanes: {
			title: {
				_: 'Filters Selected - %d',
				0: 'No Filters Selected',
				1: 'One Filter Selected'
			}
		}
	},
	layout: {
		top1: 'searchPanes'
	}
});

Alter title message to be a static string:

new DataTable('#myTable', {
	layout: {
		top1: {
			searchPanes: {
				i18n: {
					title: 'Select filters below'
				}
			}
		}
	}
});