code: public function generatePublicAlias($subject, $currentAlias = '')
      {
          $alias = $this->strategyWrapper->generatePublicAlias($subject, $currentAlias);
  
          if ($alias !== null && method_exists($subject, 'getLanguage')) {
              if (in_array($subject->getLanguage(), $this->localesToPrefix)) {
                  $alias = sprintf('%s%s%s', $this->basePath, $subject->getLanguage(), $alias);
              }
          }
  
          return $alias;
      }
docs: Generate public alias
  
  @param mixed $subject
  @param string $currentAlias
  @return string