public function findLocale($segment): ?Locale
    {
        return isset($this->locales[$segment]) ? Locale::from($this->locales[$segment]) : null;
    }
public function findLocale($segment): ?Locale
    {
        return isset($this->locales[$segment]) ? Locale::from($this->locales[$segment]) : null;
    }
public function findLocale ( $ segment ) : ? Locale { return isset ( $ this -> locales [ $ segment ] ) ? Locale :: from ( $ this -> locales [ $ segment ] ) : null ; }
Get the locale by segment identifier.

@param $segment

@return null|Locale
Get the locale by segment identifier .