protected function formatAlternateTranslationUrl($context, array $localeStruct)
    {
        $isRoutable = ($context instanceof RoutableInterface && $context->isActiveRoute());
        $langCode   = $localeStruct['code'];
        $path       = ($isRoutable ? $context->url($langCode) : ($this->currentUrl() ? : $langCode));

        if ($path instanceof UriInterface) {
            $path = $path->getPath();
        }

        return $this->baseUrl()->withPath($path);
    }