Project

General

Profile

Actions

Bug #101211

closed

GeneralUtility::formatSize does not use correct thousands separator

Added by Robert Vock 11 months ago. Updated 11 months ago.

Status:
Resolved
Priority:
Should have
Assignee:
-
Category:
Frontend
Target version:
-
Start date:
2023-06-30
Due date:
% Done:

100%

Estimated time:
TYPO3 Version:
12
PHP Version:
8.1
Tags:
Complexity:
Is Regression:
Yes
Sprint Focus:

Description

The class GeneralUtility::formatSize does not use the correct thousands separator based on the language of the current page.

This was working in TYPO3 v9 and stopped working in TYPO3 v10:
https://forge.typo3.org/issues/82491
https://forge.typo3.org/projects/typo3cms-core/repository/1749/revisions/0d6f0460798048aa22ebaf57a254ad22d52a9d88/diff/typo3/sysext/core/Classes/Utility/GeneralUtility.php

setlocale(LC_NUMERIC, 'de_DE.utf-8') is not called anymore.

Steps to reproduce:

  1. Create a Site Configuration with german language (locale: de_DE.utf-8)
  2. Call GeneralUtility::formatSize(1024*1024*2.5) within your site extension code

Expected output
2,50 Mi

Actual output
2.50 Mi


Related issues 1 (0 open1 closed)

Related to TYPO3 Core - Bug #82491: FluidStyledContent Header/Date.html Partial should respect config.locale_all typoscript setting for date format frontend outputClosedBenni Mack2017-09-15

Actions
Actions

Also available in: Atom PDF