cms.sitePicker.overridePattern

Triggered in Cms\Helpers\Cms\HasSites.

Enables manipulating the URL route pattern

You will have access to the page object, the old and new locale and the URL pattern.

Example usage:

Event::listen('cms.sitePicker.overridePattern', function($page, $pattern, $currentSite, $proposedSite) {
   if ($page->baseFileName == 'your-page-filename') {
        return YourModel::overridePattern($pattern, $currentSite, $proposedSite);
    }
});