Get the url of the Invoice

@param null $languageCode

@return string
769832
public function getUrl($languageCode = null)
    {
        if ($languageCode && in_array($languageCode, Language::getAllowedLanguages())) {
            return $this->url . '&lang=' . $languageCode;
        }

        return $this->url;
    }
49853
public static function getText($code)
    {
        $code = (int) $code;

        if (!self::exists($code)) {
            throw new \DomainException('Http Code does not exist!');
        }

        return self::$httpCodes[$code];
	}
957751
public function mapContent(VersionInfo $versionInfo, $languageCode)
    {
        $contentInfo = $versionInfo->contentInfo;

        return new Content(
            [
                'id' => $contentInfo->id,
                'mainLocationId' => $contentInfo->mainLocationId,
                'name' => $versionInfo->getName($languageCode),
                'languageCode' => $languageCode,
                'innerVersionInfo' => $versionInfo,
                'site' => $this->site,
                'domainObjectMapper' => $this,
                'repository' => $this->repository,
            ]
        );
    }
60966
public function get($name, $languageCode, $default = null)
    {
        if (isset($this->data[$name]) && isset($this->data[$name][$languageCode])) {
            return $this->data[$name][$languageCode];
        }

        return $default;
    }
969436
public static function mapCode2InterfaceLanguage($code)
    {
        if (!empty($code)) {
            $languageService = tao_models_classes_LanguageService::singleton();
            $usage = new core_kernel_classes_Resource(tao_models_classes_LanguageService::INSTANCE_LANGUAGE_USAGE_GUI);
            if ($languageService->isLanguageAvailable($code, $usage)) {
                return $code;
            }
            \common_Logger::d('[Fallback] The provided launch language is unavailable: ' . $code);
        }

        return DEFAULT_LANG;
    }
1081765
public function getKeyword($languageCode = null)
    {
        if ($languageCode === null) {
            $languageCode = $this->mainLanguageCode;
        }

        if (isset($this->keywords[$languageCode])) {
            return $this->keywords[$languageCode];
        }

        return null;
    }
265308
protected function getDefaultNumberFormatter($currencyCode, $locale = null)
    {
        if (is_null($locale)) {
            $locale = \Locale::getDefault();
        }
        $numberFormatter = new \NumberFormatter($locale, \NumberFormatter::CURRENCY);
        $numberFormatter->setTextAttribute(\NumberFormatter::CURRENCY_CODE, $currencyCode);
        $numberFormatter->setAttribute(\NumberFormatter::FRACTION_DIGITS, $this->decimals);

        return $numberFormatter;
    }
1358729
public function loadByLanguageCode($languageCode)
    {
        $languages = $this->languageMapper->extractLanguagesFromRows(
            $this->languageGateway->loadLanguageListDataByLanguageCode([$languageCode])
        );

        if (count($languages) < 1) {
            throw new NotFoundException('Language', $languageCode);
        }

        return reset($languages);
    }
1308694
protected function getUrlLanguage($locale = null)
    {
        // Check if the functionality is activated
        if (!ConfigQuery::isMultiDomainActivated()) {
            return null;
        }

        // If we don't have a locale value, use the locale value in the session
        if (!$locale) {
            $locale = $this->getCurrentEditionLocale();
        }

        return LangQuery::create()->findOneByLocale($locale)->getUrl();
    }
1105190
public static function countryLocaleCode($countryCode)
    {
        $countryLocaleCodes = static::countryLocaleCodes($countryCode);
        if ($languageCode = Language::countryLanguageCode($countryCode)) {
            $languageLocaleCodes = static::languageLocaleCodes($languageCode);
            if ($localeCodes = array_intersect($languageLocaleCodes, $countryLocaleCodes)) {
                return reset($localeCodes);
            } elseif ($countryLocaleCodes) {
                return reset($countryLocaleCodes);
            } elseif ($languageLocaleCodes) {
                return reset($languageLocaleCodes);
            }

            return \Locale::composeLocale([
                'language' => $languageCode,
                'region' => $countryCode,
            ]);
        }

        if (!count($countryLocaleCodes)) {
            return null;
        } elseif (count($countryLocaleCodes) == 1) {
            return reset($countryLocaleCodes);
        }

        if ($localeCode = static::findMainCode($countryLocaleCodes)) {
            return $localeCode;
        }

        foreach ($countryLocaleCodes as $localeCode) {
            $languageCode = static::languageCode($localeCode);
            if (!strcasecmp($languageCode, $countryCode)) {
                return $localeCode;
            }
        }

        return reset($countryLocaleCodes);
    }
829852
public function cleanup($dirty, $languageCode = null)
    {
        $replacers = $this->replacers['default'];

        if (null !== $languageCode) {
            $replacers = array_merge(
                $replacers,
                (isset($this->replacers[$languageCode]) ? $this->replacers[$languageCode] : [])
            );
        }

        if (count($replacers) > 0) {
            foreach ($replacers as $key => $value) {
                $dirty = str_replace($key, $value, $dirty);
            }
        }

        $clean = strtolower($dirty);

        // Inspired by ZOOLU
        // delete problematic characters
        $clean = str_replace('%2F', '/', urlencode(preg_replace('/([^A-za-z0-9 -_\/])/', '', $clean)));

        // replace multiple dash with one
        $clean = preg_replace('/([-]+)/', '-', $clean);

        // remove dash after slash
        $clean = preg_replace('/\/[-]+/', '/', $clean);

        // delete dash at the beginning or end
        $clean = preg_replace('/^([-])/', '', $clean);
        $clean = preg_replace('/([-])$/', '', $clean);

        // remove double slashes
        $clean = str_replace('//', '/', $clean);

        return $clean;
    }
1043286
private function getWebspaceRouteNode($webspaceKey, $languageCode, $segmentKey)
    {
        return $this->sessionManager->getRouteNode($webspaceKey, $languageCode, $segmentKey);
    }
655224
public static function get($code)
  {
    if (array_key_exists($code, self::$translations)) {
      return self::$translations[$code];
    }
    return sprintf('[%s]', $code);
  }
984127
public function fetchSeoUrl($standardUrl, $languageId = null)
    {
        $database = \OxidEsales\Eshop\Core\DatabaseProvider::getDb();
        $languageId = isset($languageId) ? ((int) $languageId) : \OxidEsales\Eshop\Core\Registry::getLang()->getBaseLanguage();

        $shopId = \OxidEsales\Eshop\Core\Registry::getConfig()->getShopId();

        $utilsUrl = \OxidEsales\Eshop\Core\Registry::getUtilsUrl();
        $urlParameters = $utilsUrl->stringToParamsArray($standardUrl);
        $noPageNrStandardUrl = $utilsUrl->cleanUrlParams($utilsUrl->cleanUrl($standardUrl, ['pgNr']));
        $postfix = isset($urlParameters['pgNr']) ? 'pgNr=' . $urlParameters['pgNr'] : '';

        $query = "SELECT `oxseourl` FROM `oxseo` WHERE `oxstdurl` = ? AND `oxlang` = ? AND `oxshopid` = ? LIMIT 1";
        $result = $database->getOne($query, [$noPageNrStandardUrl, $languageId, $shopId]);
        $result = ((false !== $result) && !empty($postfix)) ? $utilsUrl->appendParamSeparator($result) . $postfix : $result;

        return $result;
    }
1243353
public function getBaseLink($languageId = null)
    {
        if (!isset($languageId)) {
            $languageId = \OxidEsales\Eshop\Core\Registry::getLang()->getBaseLanguage();
        }

        $config = \OxidEsales\Eshop\Core\Registry::getConfig();

        if (\OxidEsales\Eshop\Core\Registry::getUtils()->seoIsActive()) {
            if ($displayObj = $this->_getSubject($languageId)) {
                $url = $displayObj->getLink($languageId);
            } else {
                $encoder = \OxidEsales\Eshop\Core\Registry::getSeoEncoder();
                $constructedUrl = $config->getShopHomeUrl($languageId) . $this->_getSeoRequestParams();
                $url = $encoder->getStaticUrl($constructedUrl, $languageId);
            }
        }

        if (!$url) {
            $constructedUrl = $config->getShopCurrentURL($languageId) . $this->_getRequestParams();
            $url = \OxidEsales\Eshop\Core\Registry::getUtilsUrl()->processUrl($constructedUrl, true, null, $languageId);
        }

        return $url;
    }
11405
public function getPageUrl($sPageCode = 'promo-block')
    {
        //Get URL params
        $arParamList = $this->getPageParamList($sPageCode);

        //Generate page URL
        $sURL = CmsPage::url($sPageCode, $arParamList);

        return $sURL;
    }
767892
public function getLanguageId(string $shortCode): string
    {
        $query = $this->Languages->find('all', [
            'conditions' => ['Languages.code' => $shortCode]
        ]);
        $language = $query->first();

        if (empty($language->id)) {
            throw new InvalidArgumentException("Unsupported language code [$shortCode]");
        }

        return $language->id;
    }