{hero}

searchPanes.i18n.title

Since: SearchPanes 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

As standard, 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.

This option allows direct configuration on the language options for the SearchPanes instance. At this time using language.searchPanes.title has the same effect as setting this option. If both are provided, this will take preference, We've made this change for consistency in our APIs moving forward.

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:

$(document).ready(function() {
    $('#example').DataTable({
        dom: 'Plfrtip',
        searchPanes: {
            i18n: {
                title: {
                    _: 'Filters Selected - %d',
                    0: 'No Filters Selected',
                    1: 'One Filter Selected'
                }
            }
        }
    });
});

Alter title message to be a static string:

$(document).ready(function() {
    $('#example').DataTable({
        dom: 'Plfrtip',
        searchPanes: {
            i18n: {
                title: 'Select filters below'
            }
        }
    });
});