From 204eaf85d72919fbba2e3a581bc334686daaf6af Mon Sep 17 00:00:00 2001 From: Ulf Seltmann <seltmann@ub.uni-leipzig.de> Date: Wed, 6 Apr 2016 14:46:46 +0200 Subject: [PATCH] fixed case sensitive locale names for unix locales --- .../VuFind/src/VuFind/View/Helper/Root/SafeMoneyFormat.php | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/module/VuFind/src/VuFind/View/Helper/Root/SafeMoneyFormat.php b/module/VuFind/src/VuFind/View/Helper/Root/SafeMoneyFormat.php index 9cf1064a57e..2c1ba73f664 100644 --- a/module/VuFind/src/VuFind/View/Helper/Root/SafeMoneyFormat.php +++ b/module/VuFind/src/VuFind/View/Helper/Root/SafeMoneyFormat.php @@ -92,7 +92,11 @@ class SafeMoneyFormat extends AbstractHelper // fail if locale has comma as a decimal separator. // (see https://bugs.php.net/bug.php?id=54538) $locale = setlocale(LC_NUMERIC, 0); - setlocale(LC_NUMERIC, ['en_us.UTF-8', 'en_us.UTF8', 'en_us']); + $codes = [ + 'en_us.UTF-8', 'en_us.UTF8', 'en_us', 'en_US.UTF-8', 'en_US.UTF8', + 'en_US' + ]; + setlocale(LC_NUMERIC, $codes); $result = $escaper( $this->formatter->formatCurrency((float)$number, $currency) ); -- GitLab