source/Core/Language.php
protected function _getLanguageFileData($blAdmin = false, $iLang = 0, $aLangFiles = null)
    {
        $myUtils = \OxidEsales\Eshop\Core\Registry::getUtils();

        $sCacheName = $this->_getLangFileCacheName($blAdmin, $iLang, $aLangFiles);
        $aLangCache = $myUtils->getLangCache($sCacheName);
        if (!$aLangCache && $aLangFiles === null) {
            if ($blAdmin) {
                $aLangFiles = $this->_getAdminLangFilesPathArray($iLang);
            } else {
                $aLangFiles = $this->_getLangFilesPathArray($iLang);
            }
        }
        if (!$aLangCache && $aLangFiles) {
            $aLangCache = [];
            $sBaseCharset = $this->getTranslationsExpectedEncoding();
            $aLang = [];
            $aLangSeoReplaceChars = [];
            foreach ($aLangFiles as $sLangFile) {
                if (file_exists($sLangFile) && is_readable($sLangFile)) {
                    //$aSeoReplaceChars null indicates that there is no setting made
                    $aSeoReplaceChars = null;
                    include $sLangFile;

                    $aLang = array_merge(['charset' => 'UTF-8'], $aLang);

                    if (isset($aSeoReplaceChars) && is_array($aSeoReplaceChars)) {
                        $aLangSeoReplaceChars = array_merge($aLangSeoReplaceChars, $aSeoReplaceChars);
                    }

                    $aLangCache = array_merge($aLangCache, $aLang);
                }
            }

            $aLangCache['charset'] = $sBaseCharset;

            // special character replacement list
            $aLangCache['_aSeoReplaceChars'] = $aLangSeoReplaceChars;

            //save to cache
            $myUtils->setLangCache($sCacheName, $aLangCache);
        }

        return $aLangCache;
    }
protected function _getLanguageFileData($blAdmin = false, $iLang = 0, $aLangFiles = null)
    {
        $myUtils = \OxidEsales\Eshop\Core\Registry::getUtils();

        $sCacheName = $this->_getLangFileCacheName($blAdmin, $iLang, $aLangFiles);
        $aLangCache = $myUtils->getLangCache($sCacheName);
        if (!$aLangCache && $aLangFiles === null) {
            if ($blAdmin) {
                $aLangFiles = $this->_getAdminLangFilesPathArray($iLang);
            } else {
                $aLangFiles = $this->_getLangFilesPathArray($iLang);
            }
        }
        if (!$aLangCache && $aLangFiles) {
            $aLangCache = [];
            $sBaseCharset = $this->getTranslationsExpectedEncoding();
            $aLang = [];
            $aLangSeoReplaceChars = [];
            foreach ($aLangFiles as $sLangFile) {
                if (file_exists($sLangFile) && is_readable($sLangFile)) {
                    //$aSeoReplaceChars null indicates that there is no setting made
                    $aSeoReplaceChars = null;
                    include $sLangFile;

                    $aLang = array_merge(['charset' => 'UTF-8'], $aLang);

                    if (isset($aSeoReplaceChars) && is_array($aSeoReplaceChars)) {
                        $aLangSeoReplaceChars = array_merge($aLangSeoReplaceChars, $aSeoReplaceChars);
                    }

                    $aLangCache = array_merge($aLangCache, $aLang);
                }
            }

            $aLangCache['charset'] = $sBaseCharset;

            // special character replacement list
            $aLangCache['_aSeoReplaceChars'] = $aLangSeoReplaceChars;

            //save to cache
            $myUtils->setLangCache($sCacheName, $aLangCache);
        }

        return $aLangCache;
    }
protected function _getLanguageFileData ( $ blAdmin = false , $ iLang = 0 , $ aLangFiles = null ) { $ myUtils = \ OxidEsales \ Eshop \ Core \ Registry :: getUtils ( ) ; $ sCacheName = $ this -> _getLangFileCacheName ( $ blAdmin , $ iLang , $ aLangFiles ) ; $ aLangCache = $ myUtils -> getLangCache ( $ sCacheName ) ; if ( ! $ aLangCache && $ aLangFiles === null ) { if ( $ blAdmin ) { $ aLangFiles = $ this -> _getAdminLangFilesPathArray ( $ iLang ) ; } else { $ aLangFiles = $ this -> _getLangFilesPathArray ( $ iLang ) ; } } if ( ! $ aLangCache && $ aLangFiles ) { $ aLangCache = [ ] ; $ sBaseCharset = $ this -> getTranslationsExpectedEncoding ( ) ; $ aLang = [ ] ; $ aLangSeoReplaceChars = [ ] ; foreach ( $ aLangFiles as $ sLangFile ) { if ( file_exists ( $ sLangFile ) && is_readable ( $ sLangFile ) ) { //$aSeoReplaceChars null indicates that there is no setting made $ aSeoReplaceChars = null ; include $ sLangFile ; $ aLang = array_merge ( [ 'charset' => 'UTF-8' ] , $ aLang ) ; if ( isset ( $ aSeoReplaceChars ) && is_array ( $ aSeoReplaceChars ) ) { $ aLangSeoReplaceChars = array_merge ( $ aLangSeoReplaceChars , $ aSeoReplaceChars ) ; } $ aLangCache = array_merge ( $ aLangCache , $ aLang ) ; } } $ aLangCache [ 'charset' ] = $ sBaseCharset ; // special character replacement list $ aLangCache [ '_aSeoReplaceChars' ] = $ aLangSeoReplaceChars ; //save to cache $ myUtils -> setLangCache ( $ sCacheName , $ aLangCache ) ; } return $ aLangCache ; }
Returns language cache array

@param bool  $blAdmin    admin or not [optional]
@param int   $iLang      current language id [optional]
@param array $aLangFiles language files to load [optional]

@return array
Returns language cache array