Split user language (UI translation) from locale (formatted values) (#4595)

This commit is contained in:
Kevin Papst
2024-01-30 00:09:53 +01:00
committed by GitHub
parent 12ef19df28
commit df3ca9d5a9
39 changed files with 685 additions and 881 deletions

View File

@@ -24,7 +24,11 @@ use Symfony\Component\Security\Core\Authentication\Token\Storage\TokenStorageInt
*/
final class ThemeOptionsSubscriber implements EventSubscriberInterface
{
public function __construct(private TokenStorageInterface $storage, private ContextHelper $helper, private LocaleService $localeService)
public function __construct(
private readonly TokenStorageInterface $storage,
private readonly ContextHelper $helper,
private readonly LocaleService $localeService
)
{
}
@@ -44,7 +48,7 @@ final class ThemeOptionsSubscriber implements EventSubscriberInterface
$this->helper->setAssetVersion((string) Constants::VERSION_ID);
if ($this->localeService->isRightToLeft(\Locale::getDefault())) {
if ($this->localeService->isRightToLeft($event->getRequest()->getLocale())) {
$this->helper->setIsRightToLeft(true);
}