Title: Change DataTables strings
Author: Tobias Bäthge
Published: December 30, 2012
Last modified: May 8, 2025

---

# Change DataTables strings

**Download**:
[Change DataTables strings Extension 1.4](https://tablepress.org/download/extension/tablepress-change-datatables-strings.zip?output_format=md)

Sometimes it is necessary or desired to change certain text strings of the features
like Search and Pagination, that are visible around a table. An example would be
to change the word “Search:” to “Filter:” or similar. These text strings are stored
in files like this (this is the English file):

    ```php
    return array(
    	'emptyTable'     => 'No data available in table',
    	'info'           => 'Showing _START_ to _END_ of _TOTAL_ entries',
    	'infoEmpty'      => 'Showing 0 to 0 of 0 entries',
    	'infoFiltered'   => '(filtered from _MAX_ total entries)',
    	'infoPostFix'    => '',
    	'lengthMenu'     => '_MENU_ entries per page',
    	'loadingRecords' => 'Loading...',
    	'processing'     => 'Processing...',
    	'search'         => 'Search:',
    	'zeroRecords'    => 'No matching records found',
    	'paginate'       => array(
    		'first'    => '❮❮',
    		'previous' => '❮',
    		'next'     => '❯',
    		'last'     => '❯❯',
    	),
    	'aria'           => array(
    		'orderable'        => ': Activate to sort',
    		'orderableReverse' => ': Activate to invert sorting',
    		'orderableRemove'  => ': Activate to remove sorting',
    		'paginate'         => array(
    			'first'    => 'First',
    			'previous' => 'Previous',
    			'next'     => 'Next',
    			'last'     => 'Last',
    		),
    	),
    	'decimal'        => '.',
    	'thousands'      => ',',
    );Code language: PHP (php)
    ```

This content denotes a PHP array with a “key” and a “value”. The “key” is used to
retrieve the particular “value” string. Most strings in this file are self-explaining.
Two of them are however not used for translations but for setting the data format
of a number, e.g. for the sorting feature. Using the `"decimal"` and `"thousands"`
parameters, the used number format can be changed. The default values in the example
above will result in the traditional English format for a number, “100,000.00”. 
To use e.g. “100.000,00”, which is more common in Europe, the values have to be 
changed to `"decimal": ","` and `"thousands": "."`.

To use this Extension, install and activate it like a regular WordPress plugin. 
Then copy the “lang-xy_XY.php” file of your language from the “tablepress/i18n/datatables/”
folder to the “tablepress-change-datatables-strings” folder. (The “en_US” file is
already in that folder, as an example.)
You can now change any string that is on
the right side of the `=>` in that copied file. Make sure to not remove any of the
quotation marks `'`. The words that are surrounded by an underscore `_` are placeholders
for the numbers or input fields that are automatically added by the DataTables script.
You must not alter those (you can however put them in a new place within the string).
With the Extension activated, TablePress will now use the strings from the modified
file.

If this Extension is useful for you, please check out the available [TablePress Premium features](https://tablepress.org/modules/)
and consider getting a [Premium license plan](https://tablepress.org/pricing/), 
which bring even more features for you and your site visitors. Thank you!