Project

General

Profile

Actions

Bug #99768

closed

Datepicker does not respect user`s preferred UI language

Added by Henrik Ziegenhain almost 2 years ago. Updated 5 months ago.

Status:
Closed
Priority:
Should have
Assignee:
-
Category:
Backend User Interface
Target version:
-
Start date:
2023-01-31
Due date:
% Done:

100%

Estimated time:
TYPO3 Version:
12
PHP Version:
8.1
Tags:
datepicker datetimepicker flatpickr picker pickr
Complexity:
Is Regression:
Yes
Sprint Focus:

Description

Hi,

currently the datepicker (flatpickr) does not respect the users preferred UI language.

Some time ago (#93663) we introduced a separate field in be_users table for selected UI language and kept user->uc['lang'] for backwards compatibility in sync.
This sync got dropped with V12 now.

DateTimePicker tries to load PersistentStorage.get("lang"). This property is empty, so the UI falls back to default/english.

The issue occurs in TYPO3\CMS\Backend\Configuration->getAll() where simply the user->uc is read. But 'lang' always is empty here.

Solution:
- Read lang from user->user['lang'] and merge arrays or
- find a completly better way to get all user configuration

Workaround: Add these lines to UserTs

setup {
  override {
    lang = de
  }
}

This issue is also reported here on StackOverflow: https://stackoverflow.com/questions/74991099/how-to-configure-datetimepicker-in-typo3-12-backend

Actions

Also available in: Atom PDF