Skip to content
  • Christian Kuhn's avatar
    [BUGFIX] Allow access to TypoScript overrides for labels in _LOCAL_LANG · 490f1269
    Christian Kuhn authored
    This bugfix enables the possibility to access _LOCAL_LANG
    values from TypoScript properly again via Extbase's
    LocalizationUtility, and thus for <f:translate> ViewHelpers
    as well again.
    
    This is what has changed under-the-hood:
    
    The TranslateViewHelper is now only a thin layer
    to Extbase's LocalizationUtility (as before), and only
    checks if a current request or Locale/languageKey is
    given, if a locale can be resolved. Everything else
    is then dispatched to the LocalizationUtility.
    
    <f:translate> is very clean now and has almost no further
    responsibility than to call LocalizationUtility::translate
    
    Instead of adding further LocalizationUtility magic,
    overriding of TypoScript is now enabled for any kind
    of plugin which hands in $extensionName. This is achieved
    by building proper Locale objects from the request which
    are then used to build the respective LanguageService.
    
    As it turned out after the 12.4.0 release, the "Locales"
    class is indeed the factory for creating a Locale, which
    is decoupled from the actual LanguageService (= label magic),
    the Locales factory receives a few create methods to make
    life easier for usage, which both f:translate AND
    LocalizationUtility receive, making their parts much smaller.
    
    Further work will dissolve the usage of the Configuration
    Manager of Extbase, but this won't happen in v12 anymore.
    
    Resolves: #100759
    Releases: main, 12.4
    Change-Id: Ifcad2ec590746e96066a96f314500bd50e9b4695
    Reviewed-on: https://review.typo3.org/c/Packages/TYPO3.CMS/+/82023
    
    
    Tested-by: default avatarcore-ci <typo3@b13.com>
    Reviewed-by: default avatarBenni Mack <benni@typo3.org>
    Tested-by: default avatarBenni Mack <benni@typo3.org>
    490f1269
Analyzing file…