src/Terranet/Localizer/Provider.php
public function find($locale)
    {
        if (null === static::$language) {
            foreach ($this->fetchAll() as $item) {
                if ($item->locale() == $locale || $item->iso6391() == $locale) {
                    static::$language = $item;
                    break;
                }
            }
        }

        return static::$language;
    }
public function find($locale)
    {
        if (null === static::$language) {
            foreach ($this->fetchAll() as $item) {
                if ($item->locale() == $locale || $item->iso6391() == $locale) {
                    static::$language = $item;
                    break;
                }
            }
        }

        return static::$language;
    }
public function find ( $ locale ) { if ( null === static :: $ language ) { foreach ( $ this -> fetchAll ( ) as $ item ) { if ( $ item -> locale ( ) == $ locale || $ item -> iso6391 ( ) == $ locale ) { static :: $ language = $ item ; break ; } } } return static :: $ language ; }
Find language by locale

@param $locale
@return mixed
Find language by locale