public function findByLanguage($language)
    {
        $language = Text::toLower($language);
        foreach ($this->getAvailable() as $locale) {
            if ($language == $locale->getLanguage(Text::LOWER)) {
                return $locale;
            }
        }

        return null;
    }
public function findByLanguage($language)
    {
        $language = Text::toLower($language);
        foreach ($this->getAvailable() as $locale) {
            if ($language == $locale->getLanguage(Text::LOWER)) {
                return $locale;
            }
        }

        return null;
    }
public function findByLanguage ( $ language ) { $ language = Text :: toLower ( $ language ) ; foreach ( $ this -> getAvailable ( ) as $ locale ) { if ( $ language == $ locale -> getLanguage ( Text :: LOWER ) ) { return $ locale ; } } return null ; }
Get locale with specified language.

@param $language

@return Locale|null
Get locale with specified language .