src/Models/CmsModel.php
public function lookupLocaleForLanguageId($languageId)
    {
        /** @var Model $languageModel */
        $languageModel = static::$cmsLanguageModel;

        $language = $languageModel::where('id', $languageId)
            ->remember((config('pxlcms.cache.languages', 15)))
            ->first();

        if (empty($language)) return null;

        return $this->normalizeToLocale($language->code);
    }
public function lookupLocaleForLanguageId($languageId)
    {
        /** @var Model $languageModel */
        $languageModel = static::$cmsLanguageModel;

        $language = $languageModel::where('id', $languageId)
            ->remember((config('pxlcms.cache.languages', 15)))
            ->first();

        if (empty($language)) return null;

        return $this->normalizeToLocale($language->code);
    }
public function lookupLocaleForLanguageId ( $ languageId ) { /** @var Model $languageModel */ $ languageModel = static :: $ cmsLanguageModel ; $ language = $ languageModel :: where ( 'id' , $ languageId ) -> remember ( ( config ( 'pxlcms.cache.languages' , 15 ) ) ) -> first ( ) ; if ( empty ( $ language ) ) return null ; return $ this -> normalizeToLocale ( $ language -> code ) ; }
Retrieves locale for a given language ID code

@param int $languageId
@return string|null  of language for ID was not found
Retrieves locale for a given language ID code