private function getAvailableLanguages()
    {
        if ($this->availableLanguages === null) {
            $this->availableLanguages = [];

            if (!empty($this->LLkey)) {
                $this->availableLanguages[] = $this->LLkey;
            }
            // The key for English is "default", not "en".
            $this->availableLanguages = str_replace(
                'en',
                'default',
                $this->availableLanguages
            );
            // Remove duplicates in case the default language is the same as the fall-back language.
            $this->availableLanguages = array_unique($this->availableLanguages);

            // Now check that we only keep languages for which we have
            // translations.
            foreach ($this->availableLanguages as $index => $code) {
                if (!isset($this->LOCAL_LANG[$code])) {
                    unset($this->availableLanguages[$index]);
                }
            }
        }

        return $this->availableLanguages;
    }
private function getAvailableLanguages()
    {
        if ($this->availableLanguages === null) {
            $this->availableLanguages = [];

            if (!empty($this->LLkey)) {
                $this->availableLanguages[] = $this->LLkey;
            }
            // The key for English is "default", not "en".
            $this->availableLanguages = str_replace(
                'en',
                'default',
                $this->availableLanguages
            );
            // Remove duplicates in case the default language is the same as the fall-back language.
            $this->availableLanguages = array_unique($this->availableLanguages);

            // Now check that we only keep languages for which we have
            // translations.
            foreach ($this->availableLanguages as $index => $code) {
                if (!isset($this->LOCAL_LANG[$code])) {
                    unset($this->availableLanguages[$index]);
                }
            }
        }

        return $this->availableLanguages;
    }
private function getAvailableLanguages ( ) { if ( $ this -> availableLanguages === null ) { $ this -> availableLanguages = [ ] ; if ( ! empty ( $ this -> LLkey ) ) { $ this -> availableLanguages [ ] = $ this -> LLkey ; } // The key for English is "default", not "en". $ this -> availableLanguages = str_replace ( 'en' , 'default' , $ this -> availableLanguages ) ; // Remove duplicates in case the default language is the same as the fall-back language. $ this -> availableLanguages = array_unique ( $ this -> availableLanguages ) ; // Now check that we only keep languages for which we have // translations. foreach ( $ this -> availableLanguages as $ index => $ code ) { if ( ! isset ( $ this -> LOCAL_LANG [ $ code ] ) ) { unset ( $ this -> availableLanguages [ $ index ] ) ; } } } return $ this -> availableLanguages ; }
Compiles a list of language keys for which localizations have been loaded.

@return string[] a list of language keys (may be empty)
Compiles a list of language keys for which localizations have been loaded .