{hero}

searchPanes.i18n

Since: SearchPanes SearchPanes 1.0.0

Container for options for language.
Please note - this property requires the SearchPanes extension for DataTables.

Description

As standard, no custom options will be applied to the pane specific language options if searchPanes.i18n is unaltered. Otherwise the related options will be applied if they are defined within this object. The language options from the parent table propagate down to the SearchPanes DataTable, so any language options set there will also affect the panes. The table specific language options for SearchPanes can be set using searchPanes.dtOpts and setting the language option within it.

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

This option is capable of holding all of the sub-options for languages for the panes for specific applications.

Default

  • Value: object

The default value for the searchPanes.i18n is an object containing all of the default values for the searchPanes.i18n.* options. These are the default values that SearchPanes uses.

Examples

Alter title messages: :

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

Change messages for viewTotal::

$(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.