From 0870b2b0ae73d5b61357ef5d85cec179d35cc0e7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michal=20=C4=8Ciha=C5=99?= Date: Mon, 12 Feb 2018 14:17:43 +0100 Subject: [PATCH 1/2] Set system locales separately MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The motranslator no longer does this, see https://github.com/phpmyadmin/motranslator/issues/24 Signed-off-by: Michal Čihař --- composer.json | 2 +- libraries/Language.php | 4 ++++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/composer.json b/composer.json index 596dae291b..11e4343072 100644 --- a/composer.json +++ b/composer.json @@ -39,7 +39,7 @@ "ext-pcre": "*", "ext-json": "*", "phpmyadmin/sql-parser": "^4.2.3", - "phpmyadmin/motranslator": "^3.4", + "phpmyadmin/motranslator": "^4.0", "phpmyadmin/shapefile": "^2.0", "tecnickcom/tcpdf": "^6.2", "phpseclib/phpseclib": "^2.0", diff --git a/libraries/Language.php b/libraries/Language.php index 8dd53ed6be..144858b56d 100644 --- a/libraries/Language.php +++ b/libraries/Language.php @@ -174,6 +174,10 @@ class Language _setlocale(0, $this->code); _bindtextdomain('phpmyadmin', LOCALE_PATH); _textdomain('phpmyadmin'); + // Set PHP locale as well + if (function_exists('setlocale')) { + setlocale(0, $locale); + } /* Text direction for language */ if ($this->isRTL()) { From 2f248be86615c63888b89a9c95f1a5f45601e6e2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michal=20=C4=8Ciha=C5=99?= Date: Mon, 12 Feb 2018 14:45:28 +0100 Subject: [PATCH 2/2] Fix variable name MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Michal Čihař --- libraries/Language.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libraries/Language.php b/libraries/Language.php index 144858b56d..f9f9cfcc8c 100644 --- a/libraries/Language.php +++ b/libraries/Language.php @@ -176,7 +176,7 @@ class Language _textdomain('phpmyadmin'); // Set PHP locale as well if (function_exists('setlocale')) { - setlocale(0, $locale); + setlocale(0, $this->code); } /* Text direction for language */