source/Setup/Language.php
public function getLanguage()
    {
        /** @var Session $oSession */
        $oSession = $this->getInstance("Session");
        /** @var Utilities $oUtils */
        $oUtils = $this->getInstance("Utilities");

        $iLanguage = $oUtils->getRequestVar("setup_lang", "post");

        if (isset($iLanguage)) {
            $oSession->setSessionParam('setup_lang', $iLanguage);
            $iLanguageSubmit = $oUtils->getRequestVar("setup_lang_submit", "post");
            if (isset($iLanguageSubmit)) {
                //updating setup language, so disabling redirect to next step, just reloading same step
                $_GET['istep'] = $_POST['istep'] = $this->getInstance("Setup")->getStep('STEP_WELCOME');
            }
        } elseif ($oSession->getSessionParam('setup_lang') === null) {
            $aLangs = ['en', 'de'];
            $sBrowserLang = strtolower(substr($_SERVER['HTTP_ACCEPT_LANGUAGE'], 0, 2));
            $sBrowserLang = (in_array($sBrowserLang, $aLangs)) ? $sBrowserLang : $aLangs[0];
            $oSession->setSessionParam('setup_lang', $sBrowserLang);
        }

        return $oSession->getSessionParam('setup_lang');
    }
public function getLanguage()
    {
        /** @var Session $oSession */
        $oSession = $this->getInstance("Session");
        /** @var Utilities $oUtils */
        $oUtils = $this->getInstance("Utilities");

        $iLanguage = $oUtils->getRequestVar("setup_lang", "post");

        if (isset($iLanguage)) {
            $oSession->setSessionParam('setup_lang', $iLanguage);
            $iLanguageSubmit = $oUtils->getRequestVar("setup_lang_submit", "post");
            if (isset($iLanguageSubmit)) {
                //updating setup language, so disabling redirect to next step, just reloading same step
                $_GET['istep'] = $_POST['istep'] = $this->getInstance("Setup")->getStep('STEP_WELCOME');
            }
        } elseif ($oSession->getSessionParam('setup_lang') === null) {
            $aLangs = ['en', 'de'];
            $sBrowserLang = strtolower(substr($_SERVER['HTTP_ACCEPT_LANGUAGE'], 0, 2));
            $sBrowserLang = (in_array($sBrowserLang, $aLangs)) ? $sBrowserLang : $aLangs[0];
            $oSession->setSessionParam('setup_lang', $sBrowserLang);
        }

        return $oSession->getSessionParam('setup_lang');
    }
public function getLanguage ( ) { /** @var Session $oSession */ $ oSession = $ this -> getInstance ( "Session" ) ; /** @var Utilities $oUtils */ $ oUtils = $ this -> getInstance ( "Utilities" ) ; $ iLanguage = $ oUtils -> getRequestVar ( "setup_lang" , "post" ) ; if ( isset ( $ iLanguage ) ) { $ oSession -> setSessionParam ( 'setup_lang' , $ iLanguage ) ; $ iLanguageSubmit = $ oUtils -> getRequestVar ( "setup_lang_submit" , "post" ) ; if ( isset ( $ iLanguageSubmit ) ) { //updating setup language, so disabling redirect to next step, just reloading same step $ _GET [ 'istep' ] = $ _POST [ 'istep' ] = $ this -> getInstance ( "Setup" ) -> getStep ( 'STEP_WELCOME' ) ; } } elseif ( $ oSession -> getSessionParam ( 'setup_lang' ) === null ) { $ aLangs = [ 'en' , 'de' ] ; $ sBrowserLang = strtolower ( substr ( $ _SERVER [ 'HTTP_ACCEPT_LANGUAGE' ] , 0 , 2 ) ) ; $ sBrowserLang = ( in_array ( $ sBrowserLang , $ aLangs ) ) ? $ sBrowserLang : $ aLangs [ 0 ] ; $ oSession -> setSessionParam ( 'setup_lang' , $ sBrowserLang ) ; } return $ oSession -> getSessionParam ( 'setup_lang' ) ; }
Returns setup interface language id

@return string
Returns setup interface language id