code: private function addLocaleToRoute(Route $route): void
      {
          if (!$this->prependLocale) {
              return;
          }
  
          $route->setPath('/{_locale}'.$route->getPath());
          $route->addRequirements(['_locale' => '[a-z]{2}(\-[A-Z]{2})?']);
      }
docs: Adds the locale to the route if prepend_locale is enabled.