source/Application/Controller/Admin/AdminController.php
protected function _getCountryByCode($sCountryCode)
    {
        //default country
        $sCountry = 'international';

        if (!empty($sCountryCode)) {
            $aLangIds = \OxidEsales\Eshop\Core\Registry::getLang()->getLanguageIds();
            $iEnglishId = array_search("en", $aLangIds);
            if (false !== $iEnglishId) {
                $sViewName = getViewName("oxcountry", $iEnglishId);
                $sQ = "select oxtitle from {$sViewName} where oxisoalpha2 = " . \OxidEsales\Eshop\Core\DatabaseProvider::getDb()->quote($sCountryCode);
                // Value does not change that often, reading from slave is ok here (see ESDEV-3804 and ESDEV-3822).
                $sCountryName = \OxidEsales\Eshop\Core\DatabaseProvider::getDb()->getOne($sQ);
                if ($sCountryName) {
                    $sCountry = $sCountryName;
                }
            } else {
                // handling when english language is deleted
                switch ($sCountryCode) {
                    case 'de':
                        return 'germany';
                    default:
                        return 'international';
                }
            }
        }

        return strtolower($sCountry);
    }
protected function _getCountryByCode($sCountryCode)
    {
        //default country
        $sCountry = 'international';

        if (!empty($sCountryCode)) {
            $aLangIds = \OxidEsales\Eshop\Core\Registry::getLang()->getLanguageIds();
            $iEnglishId = array_search("en", $aLangIds);
            if (false !== $iEnglishId) {
                $sViewName = getViewName("oxcountry", $iEnglishId);
                $sQ = "select oxtitle from {$sViewName} where oxisoalpha2 = " . \OxidEsales\Eshop\Core\DatabaseProvider::getDb()->quote($sCountryCode);
                // Value does not change that often, reading from slave is ok here (see ESDEV-3804 and ESDEV-3822).
                $sCountryName = \OxidEsales\Eshop\Core\DatabaseProvider::getDb()->getOne($sQ);
                if ($sCountryName) {
                    $sCountry = $sCountryName;
                }
            } else {
                // handling when english language is deleted
                switch ($sCountryCode) {
                    case 'de':
                        return 'germany';
                    default:
                        return 'international';
                }
            }
        }

        return strtolower($sCountry);
    }
protected function _getCountryByCode ( $ sCountryCode ) { //default country $ sCountry = 'international' ; if ( ! empty ( $ sCountryCode ) ) { $ aLangIds = \ OxidEsales \ Eshop \ Core \ Registry :: getLang ( ) -> getLanguageIds ( ) ; $ iEnglishId = array_search ( "en" , $ aLangIds ) ; if ( false !== $ iEnglishId ) { $ sViewName = getViewName ( "oxcountry" , $ iEnglishId ) ; $ sQ = "select oxtitle from {$sViewName} where oxisoalpha2 = " . \ OxidEsales \ Eshop \ Core \ DatabaseProvider :: getDb ( ) -> quote ( $ sCountryCode ) ; // Value does not change that often, reading from slave is ok here (see ESDEV-3804 and ESDEV-3822). $ sCountryName = \ OxidEsales \ Eshop \ Core \ DatabaseProvider :: getDb ( ) -> getOne ( $ sQ ) ; if ( $ sCountryName ) { $ sCountry = $ sCountryName ; } } else { // handling when english language is deleted switch ( $ sCountryCode ) { case 'de' : return 'germany' ; default : return 'international' ; } } } return strtolower ( $ sCountry ) ; }
Get english country name by country iso alpha 2 code

@param string $sCountryCode Country code

@return boolean
Get english country name by country iso alpha 2 code