public function getCode(bool $upper = false): string
    {
        $this->checkLocale();
        if (isset($this->locales[$this->selectLocale]['code'])) {
            $code = $this->locales[$this->selectLocale]['code'];
            return ($upper ? strtoupper($code) : $code);
        }
        return '';
    }
public function getCode(bool $upper = false): string
    {
        $this->checkLocale();
        if (isset($this->locales[$this->selectLocale]['code'])) {
            $code = $this->locales[$this->selectLocale]['code'];
            return ($upper ? strtoupper($code) : $code);
        }
        return '';
    }
public function getCode ( bool $ upper = false ) : string { $ this -> checkLocale ( ) ; if ( isset ( $ this -> locales [ $ this -> selectLocale ] [ 'code' ] ) ) { $ code = $ this -> locales [ $ this -> selectLocale ] [ 'code' ] ; return ( $ upper ? strtoupper ( $ code ) : $ code ) ; } return '' ; }
Get code.

@param bool $upper
@return string
Get code .