public function translate($locale = null) {
        $locale = isset($locale) ? $locale : Locale\get_active_locale();

        if( in_array( $locale, Locale\get_locales() ) )
            throw new TranslatableException(
                _('Invalid locale')
            );

        $language = $this->getByLocale($locale);

        return $this->translations()
            ->where('language_id', $language->id)
            ->first();
    }
public function translate($locale = null) {
        $locale = isset($locale) ? $locale : Locale\get_active_locale();

        if( in_array( $locale, Locale\get_locales() ) )
            throw new TranslatableException(
                _('Invalid locale')
            );

        $language = $this->getByLocale($locale);

        return $this->translations()
            ->where('language_id', $language->id)
            ->first();
    }
public function translate ( $ locale = null ) { $ locale = isset ( $ locale ) ? $ locale : Locale \ get_active_locale ( ) ; if ( in_array ( $ locale , Locale \ get_locales ( ) ) ) throw new TranslatableException ( _ ( 'Invalid locale' ) ) ; $ language = $ this -> getByLocale ( $ locale ) ; return $ this -> translations ( ) -> where ( 'language_id' , $ language -> id ) -> first ( ) ; }
Translate attribute by locale .

@param null $locale
@return mixed
@throws TranslatableException
Translate attribute by locale .