Issue Bug Closed

#101211GeneralUtility::formatSize does not use correct thousands separator

Robert Vock 06/30/23, 14:44 updated 07/09/24, 14:15

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

Reviews 2