src/Language.php
private static function parseRegion($code)
    {
        $lang = substr($code, 0, 2);
        $reg =  strtoupper(substr($code, 3, 2));
        $needle = "{$lang}-{$reg}";
        foreach (self::codes() as $code) {
            if ($code['code'] == $needle) {
                return [$reg, $code['description']];
            }
        }

        throw new UnknownLanguageCodeException(
            "The region code '{$code}'' is unknown."
        );
    }
private static function parseRegion($code)
    {
        $lang = substr($code, 0, 2);
        $reg =  strtoupper(substr($code, 3, 2));
        $needle = "{$lang}-{$reg}";
        foreach (self::codes() as $code) {
            if ($code['code'] == $needle) {
                return [$reg, $code['description']];
            }
        }

        throw new UnknownLanguageCodeException(
            "The region code '{$code}'' is unknown."
        );
    }
private static function parseRegion ( $ code ) { $ lang = substr ( $ code , 0 , 2 ) ; $ reg = strtoupper ( substr ( $ code , 3 , 2 ) ) ; $ needle = "{$lang}-{$reg}" ; foreach ( self :: codes ( ) as $ code ) { if ( $ code [ 'code' ] == $ needle ) { return [ $ reg , $ code [ 'description' ] ] ; } } throw new UnknownLanguageCodeException ( "The region code '{$code}'' is unknown." ) ; }
Get regina name and code

@param string $code

@return array
Get regina name and code