protected function getTranslationByLocaleKey($key)
    {
        foreach ($this->cachedTranslations() as $translation) {
            if ((int) $translation->getAttribute($this->getLocaleKey()) === (int) $key) {
                return $translation;
            }
        }

        return null;
    }
protected function getTranslationByLocaleKey($key)
    {
        foreach ($this->cachedTranslations() as $translation) {
            if ((int) $translation->getAttribute($this->getLocaleKey()) === (int) $key) {
                return $translation;
            }
        }

        return null;
    }
protected function getTranslationByLocaleKey ( $ key ) { foreach ( $ this -> cachedTranslations ( ) as $ translation ) { if ( ( int ) $ translation -> getAttribute ( $ this -> getLocaleKey ( ) ) === ( int ) $ key ) { return $ translation ; } } return null ; }
Find a translation by loale

@param $key
@return null
Find a translation by loale