DataTables logo DataTables

Language

The language information presented by DataTables can be completely altered for internationalisation (or localisation) using the properties of the oLanguage object. Note that all strings in the following may contain HTML tags (i.e. you can include images etc. if you so wish in them).

oLanguage.oPaginate.sFirst
Show details
Text to use when using the 'full_numbers' type of pagination for the button to take the user to the first page.
Default: First
Type: String
Code example:
$(document).ready(function() {
	$('#example').dataTable( {
		"oLanguage": {
			"oPaginate": {
				"sFirst": "First page"
			}
		}
	} );
} );
oLanguage.oPaginate.sLast
Show details
Text to use when using the 'full_numbers' type of pagination for the button to take the user to the last page.
Default: Last
Type: String
Code example:
$(document).ready(function() {
	$('#example').dataTable( {
		"oLanguage": {
			"oPaginate": {
				"sLast": "Last page"
			}
		}
	} );
} );
oLanguage.oPaginate.sNext
Show details
Text to use when using the 'full_numbers' type of pagination for the button to take the user to the next page.
Default: Next
Type: String
Code example:
$(document).ready(function() {
	$('#example').dataTable( {
		"oLanguage": {
			"oPaginate": {
				"sNext": "Next page"
			}
		}
	} );
} );
oLanguage.oPaginate.sPrevious
Show details
Text to use when using the 'full_numbers' type of pagination for the button to take the user to the previous page.
Default: Previous
Type: String
Code example:
$(document).ready(function() {
	$('#example').dataTable( {
		"oLanguage": {
			"oPaginate": {
				"sPrevious": "Previous page"
			}
		}
	} );
} );
oLanguage.sInfo
Show details
This string gives information to the end user about the information that is current on display on the page. The _START_, _END_ and _TOTAL_ variables are all dynamically replaced as the table display updates, and can be freely moved or removed as the language requirements change.
Default: Showing _START_ to _END_ of _TOTAL_ entries
Type: String
Code example:
$(document).ready(function() {
	$('#example').dataTable( {
		"oLanguage": {
			"sInfo": "Got a total of _TOTAL_ entries to show (_START_ to _END_)"
		}
	} );
} );
oLanguage.sInfoEmpty
Show details
Display information string for when the table is empty. Typically the format of this string should match sInfo.
Default: Showing 0 to 0 of 0 entries
Type: String
Code example:
$(document).ready(function() {
	$('#example').dataTable( {
		"oLanguage": {
			"sInfoEmpty": "No entries to show"
		}
	} );
} );
oLanguage.sInfoFiltered
Show details
When a user filters the information in a table, this string is appended to the information (sInfo) to give an idea of how strong the filtering is. The variable _MAX_ is dynamically updated.
Default: (filtered from _MAX_ total entries)
Type: String
Code example:
$(document).ready(function() {
	$('#example').dataTable( {
		"oLanguage": {
			"sInfoFiltered": " - filtering from _MAX_ records"
		}
	} );
} );
oLanguage.sInfoPostFix
Show details
If can be useful to append extra information to the info string at times, and this variable does exactly that. This information will be appended to the sInfo (sInfoEmpty and sInfoFiltered in whatever combination they are being used) at all times.
Default:
Type: String
Code example:
$(document).ready(function() {
	$('#example').dataTable( {
		"oLanguage": {
			"sInfoPostFix": "All records shown are derived from real information."
		}
	} );
} );
oLanguage.sLengthMenu
Show details
Detail the action that will be taken when the drop down menu for the pagination length option is changed. The '_MENU_' variable is replaced with a default select list of 10, 25, 50 and 100, and can be replaced with a custom select box if required.
Default: Show _MENU_ entries
Type: String
Code example:
/* Language change only */
$(document).ready(function() {
	$('#example').dataTable( {
		"oLanguage": {
			"sLengthMenu": "Display _MENU_ records"
		}
	} );
} );

/* Language and options change */
$(document).ready(function() {
	$('#example').dataTable( {
		"oLanguage": {
			"sLengthMenu": 'Display  records'
		}
	} );
} );
oLanguage.sProcessing
Show details
Text which is displayed when the table is processing a user action (usually a sort command or similar).
Default: Processing...
Type: String
Code example:
$(document).ready(function() {
	$('#example').dataTable( {
		"oLanguage": {
			"sProcessing": "DataTables is currently busy"
		}
	} );
} );
oLanguage.sSearch
Show details
Details the actions that will be taken when the user types into the filtering input text box.
Default: Search:
Type: String
Code example:
$(document).ready(function() {
	$('#example').dataTable( {
		"oLanguage": {
			"sSearch": "Filter records:"
		}
	} );
} );
oLanguage.sUrl
Show details
All of the language information can be stored in a file on the server-side, which DataTables will look up if this parameter is passed. It must store the URL of the language file, which is in a JSON format, and the object has the same properties as the oLanguage object in the initialiser object (i.e. the above parameters). Please refer to one of the example language files to see how this works in action.
Default:
Type: String
Code example:
$(document).ready(function() {
	$('#example').dataTable( {
		"oLanguage": {
			"sUrl": "http://www.sprymedia.co.uk/dataTables/lang.txt"
		}
	} );
} );
oLanguage.sZeroRecords
Show details
Text shown inside the table records when the is no information to be displayed. This includes when the table is filtered to zero records.
Default: No matching records found
Type: String
Code example:
$(document).ready(function() {
	$('#example').dataTable( {
		"oLanguage": {
			"sZeroRecords": "No records to display"
		}
	} );
} );