From 79aca7e0b12fdc52290d52bd593651670f548214 Mon Sep 17 00:00:00 2001 From: Tim Otten Date: Sun, 28 Aug 2022 22:31:08 -0700 Subject: [PATCH] (dev/translation#78) Civi\Core\Format - Abide by 'partial_locales' and `$locale->moneyFormat` - Fixup --- Civi/Core/Format.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Civi/Core/Format.php b/Civi/Core/Format.php index b82cf2d949..1686fa3ea9 100644 --- a/Civi/Core/Format.php +++ b/Civi/Core/Format.php @@ -43,7 +43,8 @@ class Format { $currency = Civi::settings()->get('defaultCurrency'); } if (!isset($locale)) { - $locale = Civi::settings()->get('format_locale') ?? CRM_Core_I18n::getLocale(); + global $civicrmLocale; + $locale = $civicrmLocale->moneyFormat ?? (Civi::settings()->get('format_locale') ?? CRM_Core_I18n::getLocale()); } $money = Money::of($amount, $currency, NULL, RoundingMode::HALF_UP); $formatter = $this->getMoneyFormatter($currency, $locale); -- 2.25.1