source/Core/Language.php
public function getLanguageArray($iLanguage = null, $blOnlyActive = false, $blSort = false)
    {
        $myConfig = \OxidEsales\Eshop\Core\Registry::getConfig();

        if (is_null($iLanguage)) {
            $iLanguage = $this->_iBaseLanguageId;
        }

        $aLanguages = [];
        $aConfLanguages = $myConfig->getConfigParam('aLanguages');
        $aLangParams = $myConfig->getConfigParam('aLanguageParams');

        if (is_array($aConfLanguages)) {
            $i = 0;
            reset($aConfLanguages);
            foreach ($aConfLanguages as $key => $val) {
                if ($blOnlyActive && is_array($aLangParams)) {
                    //skipping non active languages
                    if (!$aLangParams[$key]['active']) {
                        $i++;
                        continue;
                    }
                }

                if ($val) {
                    $oLang = new stdClass();
                    $oLang->id = isset($aLangParams[$key]['baseId']) ? $aLangParams[$key]['baseId'] : $i;
                    $oLang->oxid = $key;
                    $oLang->abbr = $key;
                    $oLang->name = $val;

                    if (is_array($aLangParams)) {
                        $oLang->active = $aLangParams[$key]['active'];
                        $oLang->sort = $aLangParams[$key]['sort'];
                    }

                    $oLang->selected = (isset($iLanguage) && $oLang->id == $iLanguage) ? 1 : 0;
                    $aLanguages[$oLang->id] = $oLang;
                }
                ++$i;
            }
        }

        if ($blSort && is_array($aLangParams)) {
            uasort($aLanguages, [$this, '_sortLanguagesCallback']);
        }

        return $aLanguages;
    }
public function getLanguageArray($iLanguage = null, $blOnlyActive = false, $blSort = false)
    {
        $myConfig = \OxidEsales\Eshop\Core\Registry::getConfig();

        if (is_null($iLanguage)) {
            $iLanguage = $this->_iBaseLanguageId;
        }

        $aLanguages = [];
        $aConfLanguages = $myConfig->getConfigParam('aLanguages');
        $aLangParams = $myConfig->getConfigParam('aLanguageParams');

        if (is_array($aConfLanguages)) {
            $i = 0;
            reset($aConfLanguages);
            foreach ($aConfLanguages as $key => $val) {
                if ($blOnlyActive && is_array($aLangParams)) {
                    //skipping non active languages
                    if (!$aLangParams[$key]['active']) {
                        $i++;
                        continue;
                    }
                }

                if ($val) {
                    $oLang = new stdClass();
                    $oLang->id = isset($aLangParams[$key]['baseId']) ? $aLangParams[$key]['baseId'] : $i;
                    $oLang->oxid = $key;
                    $oLang->abbr = $key;
                    $oLang->name = $val;

                    if (is_array($aLangParams)) {
                        $oLang->active = $aLangParams[$key]['active'];
                        $oLang->sort = $aLangParams[$key]['sort'];
                    }

                    $oLang->selected = (isset($iLanguage) && $oLang->id == $iLanguage) ? 1 : 0;
                    $aLanguages[$oLang->id] = $oLang;
                }
                ++$i;
            }
        }

        if ($blSort && is_array($aLangParams)) {
            uasort($aLanguages, [$this, '_sortLanguagesCallback']);
        }

        return $aLanguages;
    }
public function getLanguageArray ( $ iLanguage = null , $ blOnlyActive = false , $ blSort = false ) { $ myConfig = \ OxidEsales \ Eshop \ Core \ Registry :: getConfig ( ) ; if ( is_null ( $ iLanguage ) ) { $ iLanguage = $ this -> _iBaseLanguageId ; } $ aLanguages = [ ] ; $ aConfLanguages = $ myConfig -> getConfigParam ( 'aLanguages' ) ; $ aLangParams = $ myConfig -> getConfigParam ( 'aLanguageParams' ) ; if ( is_array ( $ aConfLanguages ) ) { $ i = 0 ; reset ( $ aConfLanguages ) ; foreach ( $ aConfLanguages as $ key => $ val ) { if ( $ blOnlyActive && is_array ( $ aLangParams ) ) { //skipping non active languages if ( ! $ aLangParams [ $ key ] [ 'active' ] ) { $ i ++ ; continue ; } } if ( $ val ) { $ oLang = new stdClass ( ) ; $ oLang -> id = isset ( $ aLangParams [ $ key ] [ 'baseId' ] ) ? $ aLangParams [ $ key ] [ 'baseId' ] : $ i ; $ oLang -> oxid = $ key ; $ oLang -> abbr = $ key ; $ oLang -> name = $ val ; if ( is_array ( $ aLangParams ) ) { $ oLang -> active = $ aLangParams [ $ key ] [ 'active' ] ; $ oLang -> sort = $ aLangParams [ $ key ] [ 'sort' ] ; } $ oLang -> selected = ( isset ( $ iLanguage ) && $ oLang -> id == $ iLanguage ) ? 1 : 0 ; $ aLanguages [ $ oLang -> id ] = $ oLang ; } ++ $ i ; } } if ( $ blSort && is_array ( $ aLangParams ) ) { uasort ( $ aLanguages , [ $ this , '_sortLanguagesCallback' ] ) ; } return $ aLanguages ; }
Returns array of available languages.

@param integer $iLanguage    Number if current language (default null)
@param bool    $blOnlyActive load only current language or all
@param bool    $blSort       enable sorting or not

@return array
Returns array of available languages .