Build the repository path given the basename, the domain and the language.

@param string $basename
@param string $domain
@param string $language

@return string
327158
public static function buildRepositoryPath(
        string $basename,
        string $domain,
        string $language
    ) : string {
        return sprintf('%s/%s.%s.yml',
            $basename,
            $domain,
            $language
        );
    }
926787
public function findFirst(string $basename): ?string
    {
        $basename = $this->getClassName($basename);
        foreach ($this->namespaces as $ns) {
            if (class_exists($ns.'\\'.$basename)) {
                return $ns.'\\'.$basename;
            }
        }
        return null;
    }
563830
protected function getMessageFilePath($language)
    {
        $messageFile = $this->aliases->get($this->basePath) . '/' . $language . '/' . $this->catalog;
        if ($this->useMoFile) {
            $messageFile .= self::MO_FILE_EXT;
        } else {
            $messageFile .= self::PO_FILE_EXT;
        }

        return $messageFile;
    }
1371764
public function dt( $domain, $string )
	{
		if( isset( $this->_translations[$domain][$string][0] ) ) {
			return $this->_translations[$domain][$string][0];
		}

		return parent::dt( $domain, $string );
	}
1316163
public function domain($domain = null) {
        if (!is_null($domain)) {
            $this->domain = $domain;
            return $this;
        } elseif (!$this->domain) {
            $this->domain = $this->scheme() . '://' . $this->host();
        }
        return $this->domain;
    }
96945
public function getDomainConfiguration($domain = null)
    {
        if ($domain && isset($this->domains[$domain])) {
            return $this->domains[$domain];
        } elseif ($domain) {
            throw new InvalidArgumentException(sprintf('Domain "%s" not found.', $domain));
        } else {
            return $this->domains;
        }
    }
704882
public function load($baseName) 
    {     
        $langFile = "{$this->dir}/{$this->locale}/{$baseName}.php";

        if (!is_file($langFile)) {
            return $this->langs;
        }
        
        $langs = include_once $langFile;
        if ($langs && is_array($langs)) {
            $this->langs = array_merge_recursive($this->langs, $langs);
        }
        
        return $this->langs;
    }
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;
    }
889334
public static function hostname($domain, bool $www=false, bool $unicode=false) {
		ref\sanitize::hostname($domain, $www, $unicode);
		return $domain;
	}
1265289
protected function get(string &$locale, string $domain, string $string): string
    {
        if ($this->catalogueManager->get($locale)->has($domain, $string)) {
            return $this->catalogueManager->get($locale)->get($domain, $string);
        }

        $locale = $this->config->getFallbackLocale();

        if ($this->catalogueManager->get($locale)->has($domain, $string)) {
            return $this->catalogueManager->get($locale)->get($domain, $string);
        }

        // we can automatically register message
        if ($this->config->isAutoRegisterMessages()) {
            $this->catalogueManager->get($locale)->set($domain, $string, $string);
            $this->catalogueManager->save($locale);
        }

        //Unable to find translation
        return $string;
    }
1308464
public function basePath(?string $basePath = null) {
        if ($basePath != null) {
            $this->basePath = $basePath;
        }
        return $this->basePath;
    }
1317337
public function instance($domain = 'app', $locale = null)
    {
        $locale = $locale ?: $this->locale;

        // The ID code is something like: 'en/system', 'en/app' or 'en/file_manager'
        $id = $locale .'/' .$domain;

        // Returns the Language domain instance, if it already exists.
        if (isset($this->instances[$id])) return $this->instances[$id];

        return $this->instances[$id] = new Language($this, $domain, $locale);
    }
1123847
public function pathInBase($filename)
    {
        $filename  = str_replace('\\', '/', $filename);
        $path_root = str_replace('\\', '/', base_path() . '/');

        return str_replace($path_root, '', $filename);
    }
493687
public function setBasePath($basePath = null) {
        if ($basePath === null) {
            $filename = (isset($this->SERVER['SCRIPT_FILENAME']))
                      ? basename($this->SERVER['SCRIPT_FILENAME'])
                      : '';

            $baseUrl = $this->getBaseUrl();
            if (empty($baseUrl)) {
                $this->_basePath = '';
                return $this;
            }

            if (basename($baseUrl) === $filename) {
                $basePath = dirname($baseUrl);
            } else {
                $basePath = $baseUrl;
            }
        }

        if (substr(PHP_OS, 0, 3) === 'WIN') {
            $basePath = str_replace('\\', '/', $basePath);
        }

        $this->_basePath = rtrim($basePath, '/');
        return $this;
    }
1024213
protected function loadDomain($domain, $locale)
    {
        $event = new LoadLanguageFileEvent($domain, $locale);

        $this->eventDispatcher->dispatch(ContaoEvents::SYSTEM_LOAD_LANGUAGE_FILE, $event);
    }
1164518
private function buildContent($locale, $domain)
    {
        $translations = [];
        $resources = [];

        if ($locale !== $this->fallbackLocale) {
            $fallbackCatalogue = $this->translator->getCatalogue($this->fallbackLocale);
            $resources = array_merge($resources, $fallbackCatalogue->getResources());
            $translations = array_merge($translations, $this->extractor->extract($fallbackCatalogue, $domain));
        }

        $catalogue = $this->translator->getCatalogue($locale);
        $resources = array_merge($resources, $catalogue->getResources());
        $translations = array_merge($translations, $this->extractor->extract($catalogue, $domain));

        $content = $this->builder->build($translations, $locale);

        return new ResourceContent($content, $resources);
    }
562255
public function basePath($basePath = null)
    {
        if (!func_num_args()) {
            return $this->_basePath;
        }
        $this->_basePath = $basePath;
        return $this;
    }