Bug #74498

PHP setlocale() should be called in \TYPO3\CMS\Lang\LanguageService::init()

Added by Michiel Roos almost 3 years ago. Updated 11 months ago.

Status:
Under Review
Priority:
Should have
Assignee:
Category:
Localization
Target version:
-
Start date:
2016-03-08
Due date:
% Done:

0%

TYPO3 Version:
8
PHP Version:
7.0
Tags:
Complexity:
Is Regression:
No
Sprint Focus:

Description

PHP setlocale() should be called in \TYPO3\CMS\Lang\LanguageService::init()

Of course with proper checking of the available system locales.

This will make it possible to call strftime and have date, time and numbers formatted according to the preferred locale.

We will need a mapping in the \TYPO3\CMS\Core\Localization\Locales object to map the $GLOBALS['BE_USER']->uc['lang'] field to a supported locale code.

History

#1 Updated by Gerrit Code Review almost 3 years ago

  • Status changed from New to Under Review

Patch set 1 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/47158

#2 Updated by Gerrit Code Review almost 3 years ago

Patch set 2 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/47158

#3 Updated by Michiel Roos almost 3 years ago

To test:
  • Choose a different language in your user settings;
  • Set TS setup: module.tx_belog.settings.dateFormat = %e %B %Y
  • Look at the dates in the System Log module
  • OR
  • Set $TYPO3_CONF_VARS['SYS']['ddmmyy'] = '%e %B %Y';
  • Set $TYPO3_CONF_VARS['SYS']['hhmm'] = '%H:%M';
  • Look at the Backend Users module

Please be aware that date formatting is not handled by the fluid
viewhelper all over the backend. So testing this will make the tstamp
formatting in list mode look weird.

#4 Updated by Susanne Moog 11 months ago

  • Category set to Localization

Also available in: Atom PDF