From 42eee5c2838caa3e727988aaee52309195b9d757 Mon Sep 17 00:00:00 2001 From: Marco Dickert Date: Thu, 23 Nov 2023 15:40:43 +0100 Subject: [PATCH] Detect language instead of hard-code. --- src/ifm.js | 2 +- src/main.php | 1 - 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/src/ifm.js b/src/ifm.js index 22c315f..5623fc2 100644 --- a/src/ifm.js +++ b/src/ifm.js @@ -1413,7 +1413,7 @@ function IFM(params) { this.formatDate = function( timestamp ) { let d = new Date( timestamp * 1000 ); - return d.toLocaleString(self.config.dateLocale); + return d.toLocaleString(navigator.language || "en-US"); }; this.getClipboardLink = function( relpath ) { diff --git a/src/main.php b/src/main.php index 9303ca9..c298cc4 100644 --- a/src/main.php +++ b/src/main.php @@ -31,7 +31,6 @@ class IFM { "tmp_dir" => "", "timezone" => "", "forbiddenChars" => [], - "dateLocale" => "en-US", "language" => "###vars:default_lang###", "selfoverwrite" => 0, "session_name" => false,