Skip to content
  • Benni Mack's avatar
    [FEATURE] Use database field be_users.lang for UI language · 650d5d7b
    Benni Mack authored and Christian Kuhn's avatar Christian Kuhn committed
    Historically (even before TYPO3 3.3.0), the UI language (the language of
    the TYPO3 Backend of a user) is stored in ->uc['lang'], which is only
    filled from the database field be_users.lang when a user logs in the
    first time.
    be_user.lang is/was used for admins when creating users to set a default
    language when the user first logs in for the first time, but is never
    used afterwards.
    
    However, using "uc[lang]" in various places does not make life easier
    because uc always needs to be unpacked (e.g. for sending bulk mails
    to users, or changing languages for users as admins, listing
    users' preferred languages in list module).
    
    For this reason, be_users.lang now defines the users' UI language,
    however uc[lang] is synced on each login of a user now, if the language
    has changed.
    
    In addition, the TCA for be_users.lang is now handled via an
    itemsProcFunc, making uncached requests a tiny bit faster as Locales are
    not populated during TCA creation, and allows for more features such as
    dynamically showing available/downloaded languages in a be_users
    FormEngine field.
    
    The Setup module now updates be_users.lang instead of uc[lang],
    which makes it easier in the future to use native TCA for rendering
    the setup module fields.
    
    An upgrade wizard migrates all "uc[lang]" values into "be_users.lang"
    and ensures that empty values are never used, instead
    "default" (= English) is added to all user records to have an explicit
    value (also for new users).
    
    Resolves: #93663
    Releases: master
    Change-Id: Icb8e07f3fabb1f3022f3adcbdce6dc9efd790302
    Reviewed-on: https://review.typo3.org/c/Packages/TYPO3.CMS/+/68192
    
    
    Tested-by: default avatarcore-ci <typo3@b13.com>
    Tested-by: default avatarTYPO3com <noreply@typo3.com>
    Tested-by: default avatarOliver Bartsch <bo@cedev.de>
    Tested-by: default avatarChristian Kuhn <lolli@schwarzbu.ch>
    Reviewed-by: default avatarOliver Bartsch <bo@cedev.de>
    Reviewed-by: default avatarChristian Kuhn <lolli@schwarzbu.ch>
    650d5d7b