source/Core/SeoEncoder.php
public function addLanguageParam($sSeoUrl, $iLang)
    {
        $iLang = (int) $iLang;
        $iDefLang = (int) \OxidEsales\Eshop\Core\Registry::getConfig()->getConfigParam('iDefSeoLang');
        $aLangIds = \OxidEsales\Eshop\Core\Registry::getLang()->getLanguageIds();

        if ($iLang != $iDefLang &&
            isset($aLangIds[$iLang]) &&
            // #0006407 bugfix, we should not search for the string saved in the db but for the escaped string
            getStr()->strpos($sSeoUrl, $this->replaceSpecialChars($aLangIds[$iLang]) . '/') !== 0
        ) {
            $sSeoUrl = $aLangIds[$iLang] . '/' . $sSeoUrl;
        }

        return $sSeoUrl;
    }
public function addLanguageParam($sSeoUrl, $iLang)
    {
        $iLang = (int) $iLang;
        $iDefLang = (int) \OxidEsales\Eshop\Core\Registry::getConfig()->getConfigParam('iDefSeoLang');
        $aLangIds = \OxidEsales\Eshop\Core\Registry::getLang()->getLanguageIds();

        if ($iLang != $iDefLang &&
            isset($aLangIds[$iLang]) &&
            // #0006407 bugfix, we should not search for the string saved in the db but for the escaped string
            getStr()->strpos($sSeoUrl, $this->replaceSpecialChars($aLangIds[$iLang]) . '/') !== 0
        ) {
            $sSeoUrl = $aLangIds[$iLang] . '/' . $sSeoUrl;
        }

        return $sSeoUrl;
    }
public function addLanguageParam ( $ sSeoUrl , $ iLang ) { $ iLang = ( int ) $ iLang ; $ iDefLang = ( int ) \ OxidEsales \ Eshop \ Core \ Registry :: getConfig ( ) -> getConfigParam ( 'iDefSeoLang' ) ; $ aLangIds = \ OxidEsales \ Eshop \ Core \ Registry :: getLang ( ) -> getLanguageIds ( ) ; if ( $ iLang != $ iDefLang && isset ( $ aLangIds [ $ iLang ] ) && // #0006407 bugfix, we should not search for the string saved in the db but for the escaped string getStr ( ) -> strpos ( $ sSeoUrl , $ this -> replaceSpecialChars ( $ aLangIds [ $ iLang ] ) . '/' ) !== 0 ) { $ sSeoUrl = $ aLangIds [ $ iLang ] . '/' . $ sSeoUrl ; } return $ sSeoUrl ; }
Returns part of url defining active language

@param string $sSeoUrl seo url
@param int    $iLang   language id

@return string
Returns part of url defining active language