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

        return null;
    }