diff --git a/.env.example b/.env.example index eb484cbc..fb2772a4 100644 --- a/.env.example +++ b/.env.example @@ -6,6 +6,7 @@ APP_URL=http://localhost #list with timezones https://www.php.net/manual/en/timezones.php APP_TIMEZONE=UTC LOCALE=en +DATATABLE_LOCALE=en-gb DB_CONNECTION=mysql DB_HOST=127.0.0.1 diff --git a/config/app.php b/config/app.php index 7ca6180b..13384bb3 100644 --- a/config/app.php +++ b/config/app.php @@ -83,6 +83,19 @@ return [ 'locale' => env('LOCALE', 'en'), + /* + |-------------------------------------------------------------------------- + | Datatable Language Setting + |-------------------------------------------------------------------------- + | + | This is the Language-Code used on the Datatables. + | You can grab the Language-Codes from this Website + | https://datatables.net/plug-ins/i18n/ + | + */ + + 'datatable_locale' => env('DATATABLE_LOCALE', 'en-gb'), + /* |-------------------------------------------------------------------------- | Application Fallback Locale diff --git a/resources/views/admin/api/index.blade.php b/resources/views/admin/api/index.blade.php index 694f3473..6eaf5fba 100644 --- a/resources/views/admin/api/index.blade.php +++ b/resources/views/admin/api/index.blade.php @@ -64,6 +64,9 @@ document.addEventListener("DOMContentLoaded", function () { $('#datatable').DataTable({ + language: { + url: '//cdn.datatables.net/plug-ins/1.11.3/i18n/{{config("app.datatable_locale")}}.json' + }, processing: true, serverSide: true, stateSave: true, diff --git a/resources/views/admin/configurations/index.blade.php b/resources/views/admin/configurations/index.blade.php index e8fc8623..bed5435f 100644 --- a/resources/views/admin/configurations/index.blade.php +++ b/resources/views/admin/configurations/index.blade.php @@ -64,6 +64,9 @@