private function runMultiLanguage(): void
    {
        // check if multi-language is enabled
        if (!App::$Properties->get('multiLanguage')) {
            $this->language = App::$Properties->get('singleLanguage');
            return;
        }

        // check if domain-lang binding is enabled
        if (Any::isArray(App::$Properties->get('languageDomainAlias'))) {
            /** @var array $domainAlias */
            $domainAlias = App::$Properties->get('languageDomainAlias');
            if (Any::isArray($domainAlias) && !Str::likeEmpty($domainAlias[$this->getHost()])) {
                $this->language = $domainAlias[$this->getHost()];
            }
            return;
        }

        // try to find language in pathway
        foreach (App::$Properties->get('languages') as $lang) {
            if (Str::startsWith('/' . $lang, $this->getPathInfo())) {
                $this->language = $lang;
                $this->languageInPath = true;
            }
        }

        // try to find in ?lang get
        if (!$this->language && Arr::in($this->query->get('lang'), App::$Properties->get('languages'))) {
            $this->language = $this->query->get('lang');
        }

        // language still not defined?!
        if (!$this->language) {
            $this->setLanguageFromBrowser();
        }
    }
private function runMultiLanguage(): void
    {
        // check if multi-language is enabled
        if (!App::$Properties->get('multiLanguage')) {
            $this->language = App::$Properties->get('singleLanguage');
            return;
        }

        // check if domain-lang binding is enabled
        if (Any::isArray(App::$Properties->get('languageDomainAlias'))) {
            /** @var array $domainAlias */
            $domainAlias = App::$Properties->get('languageDomainAlias');
            if (Any::isArray($domainAlias) && !Str::likeEmpty($domainAlias[$this->getHost()])) {
                $this->language = $domainAlias[$this->getHost()];
            }
            return;
        }

        // try to find language in pathway
        foreach (App::$Properties->get('languages') as $lang) {
            if (Str::startsWith('/' . $lang, $this->getPathInfo())) {
                $this->language = $lang;
                $this->languageInPath = true;
            }
        }

        // try to find in ?lang get
        if (!$this->language && Arr::in($this->query->get('lang'), App::$Properties->get('languages'))) {
            $this->language = $this->query->get('lang');
        }

        // language still not defined?!
        if (!$this->language) {
            $this->setLanguageFromBrowser();
        }
    }
private function runMultiLanguage ( ) : void { // check if multi-language is enabled if ( ! App :: $ Properties -> get ( 'multiLanguage' ) ) { $ this -> language = App :: $ Properties -> get ( 'singleLanguage' ) ; return ; } // check if domain-lang binding is enabled if ( Any :: isArray ( App :: $ Properties -> get ( 'languageDomainAlias' ) ) ) { /** @var array $domainAlias */ $ domainAlias = App :: $ Properties -> get ( 'languageDomainAlias' ) ; if ( Any :: isArray ( $ domainAlias ) && ! Str :: likeEmpty ( $ domainAlias [ $ this -> getHost ( ) ] ) ) { $ this -> language = $ domainAlias [ $ this -> getHost ( ) ] ; } return ; } // try to find language in pathway foreach ( App :: $ Properties -> get ( 'languages' ) as $ lang ) { if ( Str :: startsWith ( '/' . $ lang , $ this -> getPathInfo ( ) ) ) { $ this -> language = $ lang ; $ this -> languageInPath = true ; } } // try to find in ?lang get if ( ! $ this -> language && Arr :: in ( $ this -> query -> get ( 'lang' ) , App :: $ Properties -> get ( 'languages' ) ) ) { $ this -> language = $ this -> query -> get ( 'lang' ) ; } // language still not defined?! if ( ! $ this -> language ) { $ this -> setLanguageFromBrowser ( ) ; } }
Build multi language pathway binding.
@return void
Build multi language pathway binding .