{hero}

searchPanes.i18n.count

Since: SearchPanes SearchPanes 1.0.0

Set the message to be displayed in the count column when not searching.
Please note - this property requires the SearchPanes extension for DataTables.

Description

As standard, SearchPanes will set the count column to display the total number of different values visible in the column when no filtering is taking place.

SearchPanes replace two strings when creating the output for the count column: {shown} is the count for each different value that is currently displayed in the DataTable, {total} is the total count for each different value that is in the DataTable. When no filtering is taking place, {total} and {shown} will be the same value.

Both of the above strings can be included in the count message although they will be the same when no filtering is taking place.

This message will be shown regardless of the value of searchPanes.viewTotal, although it will only change to the message in searchPanes.i18n.countFiltered when searchPanes.viewTotal is true.

This option allows direct configuration on the language options for the SearchPanes instance. At this time using language.searchPanes.count 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.

Type

string

Description:

searchPanes.i18n.count changes what will be displayed in the count column if not filtering.

Default

  • Value: {total}

The default value for the searchPanes.i18n.count parameter is {total}.

Example

Change messages for row count::

$(document).ready(function() {
    $('#example').DataTable({
        searchPanes: {
            viewTotal: true,
			i18n: {
                count: '{total} found',
                countFiltered: '{shown} ({total})'
            }
        },
        dom: 'Plfrtip'
    });
});

Related

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