{hero}

language.columnControl

Since: ColumnControl 1.0

Set the strings that are used by ColumnControl content types.
Please note - this property requires the ColumnControl extension for DataTables.

Description

This object provides the ability to specify the language strings that are used by the content types ColumnControl has built in. Many of the string can be specify in the content type options, however, this object gives a common central location for the strings, and the opportunity for them to be loaded via Ajax.

The table below shows the top level translation keys, the default values, and which content types each option is used by. Further details for each is available in its relevant content type documentation. These keys are available under language.columnControl:

Object key Content type Default value
.colVis colVis Column visibility
.colVisDropdown colVisDropdown Column visibility
.dropdown dropdown More...
.orderAddAsc orderAddAsc Add Sort Ascending
.orderAddDesc orderAddDesc Add Sort Descending
.orderAsc orderAsc Sort Ascending
.orderClear orderClear Clear sort
.orderDesc orderDesc Sort Descending
.orderRemove orderRemove Remove from sort
.reorder reorder Reorder columns
.reorderLeft reorderLeft Move column left
.reorderRight reorderRight Move column right
.searchClear searchClear Clear search
.searchDropdown searchDropdown Search
.searchList searchList Empty string
.spacer spacer Empty string

Check list options

The following are keys under the language.columnControl.list object:

Object key Content type Default value
.all colVis, searchList Select all
.empty searchList Empty
.none colVis, searchList Deselect
.search colVis, searchList Search...

Search logic options

The input based search content types (searchText, searchNumber and searchDateTime) provide different options for the logic used for the search. These options are presented to the end user through a select list. The labels used for the logic options can be translated using the options below.

DateTime

The following are keys under the language.columnControl.search.datetime object:

Object key Content type Default value
.equal searchDateTime Equals
.notEqual searchDateTime Does not equal
.greater searchDateTime After
.less searchDateTime Before
.empty searchDateTime Empty
.notEmpty searchDateTime Not empty

Numbers

The following are keys under the language.columnControl.search.number object:

Object key Content type Default value
.equal searchNumber Equals
.notEqual searchNumber Does not equal
.greater searchNumber Greater than
.greaterOrEqual searchNumber Greater or equal
.less searchNumber Less than
.lessOrEqual searchNumber Less or equal
.empty searchNumber Empty
.notEmpty searchNumber Not empty

Text

The following are keys under the language.columnControl.search.text object:

Object key Content type Default value
.contains searchText Contains
.notContains searchText Does not contain
.equal searchText Equals
.notEqual searchText Does not equal
.starts searchText Starts
.ends searchText Ends
.empty searchText Empty
.notEmpty searchText Not empty

Buttons

ColumnControl adds a button to the Buttons extension, with the possibility of more being added in future. The following key is available in the language.columnControl.buttons object:

Object key Content type Default value
.searchClear ccSearchClear Clear search

Type

object

An object with key / value pairs which are used for ColumnControl's strings.

Example

Set the translation string for two buttons:

new DataTable('#myTable', {
	columnControl: [['orderAsc', 'orderDesc']],
	language: {
		columnControl: {
			orderAsc: 'Ordre croissant',
			orderDesc: 'Ordre décroissant'
		}
	}
});

Related

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