ModifyLanguagePackRemoteBaseUrlEvent 

Deprecated since version 14.2 Deprecation: #109027 - Move language:update command and events to EXT:core

The event ModifyLanguagePackRemoteBaseUrlEvent have been moved to typo3/cms-core . Therefore the namespace changed from \TYPO3\CMS\Install\Service\Event\ModifyLanguagePackRemoteBaseUrlEvent to \TYPO3\CMS\Core\Localization\Event\ModifyLanguagePackRemoteBaseUrlEvent .

There is a class alias that will be removed with TYPO3 v15.0.

The PSR-14 event \TYPO3\CMS\Core\Localization\Event\ModifyLanguagePackRemoteBaseUrlEvent allows to modify the main URL of a language pack.

Example: Download the language packs of an extension from a mirror 

EXT:my_extension/Classes/EventListener/CustomMirror.php
<?php

declare(strict_types=1);

namespace MyVendor\MyExtension\EventListener;

use TYPO3\CMS\Core\Attribute\AsEventListener;
use TYPO3\CMS\Core\Http\Uri;
use TYPO3\CMS\Install\Service\Event\ModifyLanguagePackRemoteBaseUrlEvent;

#[AsEventListener(
  identifier: 'my-extension/custom-mirror',
)]
final readonly class CustomMirror
{
  private const EXTENSION_KEY = 'my_extension';
  private const MIRROR_URL = 'https://example.org/typo3-packages/';

  public function __invoke(ModifyLanguagePackRemoteBaseUrlEvent $event): void
  {
    if ($event->getPackageKey() === self::EXTENSION_KEY) {
      $event->setBaseUrl(new Uri(self::MIRROR_URL));
    }
  }
}
Copied!

API 

final class ModifyLanguagePackRemoteBaseUrlEvent
Fully qualified name
\TYPO3\CMS\Core\Localization\Event\ModifyLanguagePackRemoteBaseUrlEvent

Event to modify the main URL of a language

getBaseUrl()
Returns
\Psr\Http\Message\UriInterface
setBaseUrl(\Psr\Http\Message\UriInterface $baseUrl)
param $baseUrl

the baseUrl

getPackageKey()
Returns
string