protected function storeSlugForLanguageId()
    {
        /** @var CmsModel|SluggableTrait $this */

        $config      = $this->getSluggableConfig();
        $languageKey = array_get($config, 'language_key');
        $localeKey   = array_get($config, 'locale_key');

        if ($languageKey) {
            return $this->getAttribute($languageKey);
        }

        if ($localeKey) {
            return $this->lookupLanguageIdForLocale( $this->getAttribute($localeKey) );
        }

        return null;
    }