From 48d6b496d58cc510a99443399afccd49e44b77df Mon Sep 17 00:00:00 2001 From: Michel Date: Sun, 19 Jul 2026 13:06:47 +0200 Subject: [PATCH] Added support for a languages folder --- readme.txt | 1 + wp-jquery-datatable.php | 5 +++++ 2 files changed, 6 insertions(+) diff --git a/readme.txt b/readme.txt index c2c5c03..f9cc943 100644 --- a/readme.txt +++ b/readme.txt @@ -72,6 +72,7 @@ Is this plugin prepared for multisites? Yes. * Forked by [Michel Bats](https://batssoft.nl/). * Bumped DataTables to version 2.3.8. * Moved the settings page under the settings menu. +* Added support for a languages folder. = 4.1.0 = * Compatibility with WordPress version 6.7.1 diff --git a/wp-jquery-datatable.php b/wp-jquery-datatable.php index 6873561..33469d0 100644 --- a/wp-jquery-datatable.php +++ b/wp-jquery-datatable.php @@ -289,6 +289,11 @@ function wp_jdt_style_and_script() wp_enqueue_script('jdt-js-datatables', plugins_url('js/dataTables.js', __FILE__), array('jquery'), '2.3.8'); } +add_action('plugins_loaded', 'wp_jdt_load_textdomain'); +function wp_jdt_load_textdomain() { + load_plugin_textdomain('wp-jquery-datatable', false, dirname(plugin_basename(__FILE__)) . '/languages'); +} + add_shortcode('wp_jdt', 'wp_jdt_shortcode'); // add shortcode [wp_jdt id="test" info="true" paging="true" page_length="7" paging_type="full_numbers" b_length_change="true" ordering="true" order_row_number="3" order_row_number_sort="desc" searching="true"] function wp_jdt_shortcode($atts, $content = "") {