{hero}

language.searchBuilder.title

Since: SearchBuilder 1.0.0

Set the SearchBuilder Title text.
Please note - this property requires the SearchBuilder extension for DataTables.

Description

Searchbuilder can show summary information about the number of filters currently being implemented in the title field, providing quick and useful information to the end user.

Internally the DataTables' i18n() method is used to determine the string value to display, which can provide complex singular, plural, dual, etc language strings for true multi-language support. Please refer to the object section below for details.

Types

string

Description:

The language string to be displayed without any pluralisation considerations. The string can contain %d which will be replaced with the number of filters selected.

object

Description:

As an object this option can be used to define different strings to use for the various singular, plural, dual, etc options required by many languages. If the number of filters selected matches a parameter name in the object, the value of that parameter will be used. If there is no match the _ (which must be defined) is used as the default.

As with the string case above, any of the parameter values defined in this object can contain the string %d which will be replaced with the number of filters selected.

Default

  • Value: {0: 'Search Builder', _: 'Search Builder (%d)'}

Examples

Change message for SearchBuilder Title within a button:

$(document).ready(function() {
    $('#example').DataTable( {
        language: {
            searchBuilder: {
                title: 'Search Builder Title'
            }
        },
        buttons: [ 'searchBuilder' ],
        dom: 'Bfrtip'
    });
});

Include counts in the title:

$(document).ready(function() {
    $('#example').DataTable( {
        language: {
            searchBuilder: {
                title: {
					0: 'Search Builder',
					_: 'Search Builder (%d)'
				}
            }
        },
        titles:[
            'SearchBuilder'
        ],
        dom: 'Bfrtip',
    });
});

Related

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