public function getPrioritizedLanguages(?array $forcedLanguages): array
    {
        // Skip if languages param has been set by API user
        if ($forcedLanguages !== null) {
            return $forcedLanguages;
        }

        // Detect if we should load all languages by default
        if ($this->defaultShowAllTranslations) {
            return Language::ALL;
        }

        // create language based on context and configuration, where context language is made most important one
        $languages = [];
        if ($this->contextLanguage !== null) {
            $languages[] = $this->contextLanguage;
        }

        return array_values(array_unique(array_merge($languages, $this->configLanguages)));
    }