language.columnControl
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 translation keys (i.e. what to use in this object for the property name), the default values and which content types each option is used by. Further details for each is available in its relevant content type documentation.
Object key | Content type | Default value |
---|---|---|
colVis |
colVis |
Column visibility |
colVisDropdown |
colVisDropdown |
'-string 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 |
list.add |
colVis , searchList |
Select all |
list.none |
colVis , searchList |
Deselect |
list.search |
colVis , searchList |
Search... |
Please note that the list
parameter should be a nested object - e.g. {list: {add: '...'}}
. It is shown in the table above as dotted Javascript notation for brevity.
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.