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

Files 1

History 59

  1. Markus Timtner commented 02/15/23, 19:10

    Can confirm this also occurs in the current TYPO3 v11 -
    IMHO should the timeformat of the datepicker be configurable apart from the user language settting and should use the systems datetime settings.

  2. Gerrit Code Review pushed patch set 1 for main to change 78313 status New Under Review 03/29/23, 07:08

  3. Gerrit Code Review pushed patch set 2 for main to change 78313 03/29/23, 07:12

  4. Gerrit Code Review pushed patch set 3 for main to change 78313 03/29/23, 07:40

  5. Gerrit Code Review pushed patch set 4 for main to change 78313 03/29/23, 07:47

  6. Andreas Fernandez commented and changed status Under Review Resolved done 0 % 100 % 03/29/23, 17:55

    Applied in changeset commit:6648d8819b66868170d70da37c9122444074cf77.

  7. Benni Mack changed status Resolved Closed 07/09/24, 12:46

  8. Michael Stopp commented and changed attached datetimepicker.png 05/16/25, 16:15

    Since this issue is tagged with datepicker AND datetimepicker, I would expect that both date AND time selection should respect the language. But that’s not the case:

    datetimepicker.png

    Tested in v12 + v13 with Firefox and Chrome.

    IMHO, this issue should not be closed.

  9. Garvin Hicking commented 06/02/25, 06:49

    Hi @stopp !

    Sadly I believe this is a missing feature in the used flatpickr component, it does not seem to have abstraction for the word “Today”: https://github.com/flatpickr/flatpickr/issues/2731

    (However the “AM/PM” goes away in recent versions for me.

    Regards,
    Garvin