public function getFallbackLanguages()
    {
        if (empty($this->fallback_languages)) {
            if ($this->enabled()) {
                $fallback_languages = $this->languages;

                if ($this->active) {
                    $active_extension = $this->active;
                    $key = \array_search($active_extension, $fallback_languages, true);
                    unset($fallback_languages[$key]);
                    array_unshift($fallback_languages, $active_extension);
                }
                $this->fallback_languages = $fallback_languages;
            }
            // always add english in case a translation doesn't exist
            $this->fallback_languages[] = 'en';
        }

        return $this->fallback_languages;
    }
public function getFallbackLanguages()
    {
        if (empty($this->fallback_languages)) {
            if ($this->enabled()) {
                $fallback_languages = $this->languages;

                if ($this->active) {
                    $active_extension = $this->active;
                    $key = \array_search($active_extension, $fallback_languages, true);
                    unset($fallback_languages[$key]);
                    array_unshift($fallback_languages, $active_extension);
                }
                $this->fallback_languages = $fallback_languages;
            }
            // always add english in case a translation doesn't exist
            $this->fallback_languages[] = 'en';
        }

        return $this->fallback_languages;
    }
public function getFallbackLanguages ( ) { if ( empty ( $ this -> fallback_languages ) ) { if ( $ this -> enabled ( ) ) { $ fallback_languages = $ this -> languages ; if ( $ this -> active ) { $ active_extension = $ this -> active ; $ key = \ array_search ( $ active_extension , $ fallback_languages , true ) ; unset ( $ fallback_languages [ $ key ] ) ; array_unshift ( $ fallback_languages , $ active_extension ) ; } $ this -> fallback_languages = $ fallback_languages ; } // always add english in case a translation doesn't exist $ this -> fallback_languages [ ] = 'en' ; } return $ this -> fallback_languages ; }
Gets an array of languages with active first, then fallback languages

@return array
Gets an array of languages with active first then fallback languages