public function hasTranslation($locale = null)
    {
        $locale = $locale ?: \localizer\locale()->id();

        foreach ($this->cachedTranslations() as $translation) {
            if ((int) $translation->getAttribute($this->getLocaleKey()) === (int) $locale) {
                return true;
            }
        }

        return false;
    }
public function hasTranslation($locale = null)
    {
        $locale = $locale ?: \localizer\locale()->id();

        foreach ($this->cachedTranslations() as $translation) {
            if ((int) $translation->getAttribute($this->getLocaleKey()) === (int) $locale) {
                return true;
            }
        }

        return false;
    }
public function hasTranslation ( $ locale = null ) { $ locale = $ locale ? : \ localizer \ locale ( ) -> id ( ) ; foreach ( $ this -> cachedTranslations ( ) as $ translation ) { if ( ( int ) $ translation -> getAttribute ( $ this -> getLocaleKey ( ) ) === ( int ) $ locale ) { return true ; } } return false ; }
Check if translation exists

@param null $locale
@return bool
Check if translation exists