Issue Bug Closed

#99768Datepicker does not respect user`s preferred UI language

Henrik Ziegenhain 01/31/23, 10:49 updated 06/02/25, 06:49

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

Reviews 1