From f1d74f922d821a27ef0721dcdfbb859248f0b1ad Mon Sep 17 00:00:00 2001 From: TheOnlyMace <0815cracky@gmail.com> Date: Wed, 22 Jul 2026 19:19:43 +0200 Subject: [PATCH] Refactor number formatting in landing page for improved localization support - Updated the number formatting logic in index.php to enhance localization handling for German and English. - Introduced variables for decimal and thousands separators based on the user's locale, ensuring accurate number representation. --- landingpage/index.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/landingpage/index.php b/landingpage/index.php index d8e05d9..17db3c9 100644 --- a/landingpage/index.php +++ b/landingpage/index.php @@ -43,7 +43,9 @@ $formatNumber = static function (int $value) use ($numberLocale): string { return $formatted; } } - return number_format($value, 0, $locale === 'de' ? ',' : '.', $locale === 'de' ? '.' : ','); + $decimal = $numberLocale === 'de_DE' ? ',' : '.'; + $thousands = $numberLocale === 'de_DE' ? '.' : ','; + return number_format($value, 0, $decimal, $thousands); }; /** @var array}> $groups */