Array of requested file in different languages.

@return array
480984
private function filesFromKey()
    {
        try {
            return $this->manager->files()[$this->file];
        } catch (\ErrorException $e) {
            $this->error(sprintf('Language file %s.php not found!', $this->file));

            return [];
        }
    }
1006693
public function getAvailableLanguages()
    {
        $translationSiteAccesses = $this->configResolver->getParameter('translation_siteaccesses');
        $relatedSiteAccesses = $translationSiteAccesses ?: $this->configResolver->getParameter('related_siteaccesses');
        $availableLanguages = array();
        $currentLanguages = $this->configResolver->getParameter('languages');
        $availableLanguages[] = array_shift($currentLanguages);

        foreach ($relatedSiteAccesses as $sa) {
            $languages = $this->configResolver->getParameter('languages', null, $sa);
            $availableLanguages[] = array_shift($languages);
        }

        sort($availableLanguages);

        return array_unique($availableLanguages);
    }
694937
public function getUsedLocales()
    {
        $queryBuilder = $this->createQueryBuilder('blog')
            ->select('DISTINCT(b_translation.locale) AS locale')
            ->join('blog.translations', 'b_translation');

        $locales = [];
        foreach ($queryBuilder->getQuery()->getResult() as $locale) {
            $locales[] = $locale['locale'];
        }

        return $locales;
    }
1288175
public function languages()
    {
        $languages = array_map(function ($directory) {
            return basename($directory);
        }, $this->disk->directories($this->path));

        $languages = array_filter($languages, function ($directory) {
            return $directory != 'vendor' && $directory != 'json';
        });

        sort($languages);

        return Arr::except($languages, ['vendor', 'json']);
    }
1047560
public function getLanguages()
    {
        $url = $this->getGetLanguagesUrl();
        $response = $this->sendRequest(
            'GET',
            $url,
            [
                'version' => $this->serviceProtocolVersion
            ]
        );
        if ($response->getStatusCode() === 200) {
            $languages = $this->parseGetLanguagesResponse($response);
            return $languages;
        }
        return false;
    }
521415
public function getContentLanguages()
    {
        $contentLanguages = [];
        /** @var FileVersionContentLanguage $contentLanguage */
        foreach ($this->getFileVersion()->getContentLanguages() as $contentLanguage) {
            $contentLanguages[] = $contentLanguage->getLocale();
        }

        return $contentLanguages;
    }
675203
protected function getListLanguage()
    {
        $id = $this->getParam(0);

        if (!isset($id)) {
            $list = $this->language->getList();
            $this->limitArray($list);
            return $list;
        }

        $result = $this->language->get($id);

        if (empty($result)) {
            $this->errorAndExit($this->text('Unexpected result'));
        }

        return array($result);
    }
1272480
protected function getLanguages()
    {
        // Check if we have the data in the cache.
        if (null !== $this->languageCache) {
            return $this->languageCache;
        }

        $loadedLanguage = $this->getMetaModel()->getActiveLanguage();
        $languageValues = $this->getLanguageNames($loadedLanguage);
        $languages      = $this->getRealLanguages();
        $keys           = \array_keys($languages);
        $aux            = [];
        $real           = [];

        // Fetch real language values.
        foreach ($keys as $key) {
            if (isset($languageValues[$key])) {
                $aux[$key]  = \utf8_romanize($languageValues[$key]);
                $real[$key] = $languageValues[$key];
            }
        }

        // Add needed fallback values.
        $keys = \array_diff($keys, \array_keys($aux));
        if ($keys) {
            $this->addNeededFallbackLanguages($keys, $aux, $real);
        }

        $keys = \array_diff($keys, \array_keys($aux));
        if ($keys) {
            foreach ($keys as $key) {
                $aux[$key]  = \utf8_romanize($languages[$key]);
                $real[$key] = $languages[$key];
            }
        }

        \asort($aux);
        $return = [];
        foreach (\array_keys($aux) as $key) {
            $return[$key] = $real[$key];
        }

        // Switch back to the original FE language to not disturb the frontend.
        if ($loadedLanguage != $GLOBALS['TL_LANGUAGE']) {
            $event = new LoadLanguageFileEvent('languages', null, true);
            $this->eventDispatcher->dispatch(ContaoEvents::SYSTEM_LOAD_LANGUAGE_FILE, $event);
        }

        return $this->languageCache = $return;
    }
533898
public function getSupportedLanguages()
    {
        return array(
            self::LANG_SR,
            self::LANG_RU,
            self::LANG_BE,
            self::LANG_MK,
            self::LANG_UK,
            self::LANG_BG,
            self::LANG_EL
        );
    }
453517
public function getAvailableLanguages()
    {
        $languages = [];

        $paths = $this->fileSystem->getDirectories($this->getLanguagesPath());

        foreach ($paths as $path) {
            $languages[] = substr($path, strlen($this->getLanguagesPath()) + 1);
        }

        return $languages;
    }
801282
protected function translations(array $files = array())
    {
        $return = [];
        foreach ($files as $file) {
            $translation = $this->getStringsBetween($file->getContents(), 'trans(\'', "')");
            $translation = array_filter($translation, function($element) {
                if (str_contains($element, ', {')) {
                    return false;
                }
                return $element;
            });
            $translationWithParams = $this->getStringsBetween($file->getContents(), 'trans(\'', "', {");
            $translation           = array_merge($translation, $translationWithParams);
            $return                = array_merge($return, $translation);
        }
        return $return;
    }
1261201
private function filesFromKey()
    {
        try {
            return $this->manager->files()[$this->fileName];
        } catch (\ErrorException $e) {
            if ($this->confirm(sprintf('Language file %s.php not found, would you like to create it?', $this->fileName))) {
                $this->manager->createFile(str_replace($this->packageName.'::', '', $this->fileName));
            }

            return [];
        }
    }
164931
public function getSupportedLanguages(): array
    {
        if (null === $this->supportedLanguages) {
            $this->supportedLanguages = [];
            $files = new \DirectoryIterator($this->getDictionaryFolder());
            foreach ($files as $file) {
                if ($file->getExtension() === 'aff') {
                    $this->supportedLanguages[] = $file->getBasename('.aff');
                }
            }
            sort($this->supportedLanguages);
        }

        return $this->supportedLanguages;
    }
519915
private function gatherTranslatableStrings()
    {
        $this->translatables = [];

        $this->scanTwigFiles();
        $this->scanPhpFiles();

        ksort($this->translatables);
    }
45258
public function toArray(): array
    {
        return [
            "clientFilename" => $this->getClientFilename(),
            "unverifiedContentType" => $this->error ? "" : $this->getContentType(true),
            "verifiedContentType" => $this->error ? "" : $this->getContentType(),
            "size" => $this->error ? 0 : $this->getSize(),
            "tempPath" => $this->error ? "" : $this->getTempPath(),
            "error" => $this->error ? $this->error->getMessage() : "",
        ];
    }
817404
public function getLanguages()
    {
        $source = $this->server['HTTP_ACCEPT_LANGUAGE'];

        if (strpos($source, ',') !== false) {
            $langs = explode(',', $source);
            return $langs;
        } else {
            return array($source);
        }
    }
246449
private function getI18nStats()
	{
		$selected_instance   = $this->filter_post->getString( 'instance' );
		$selected_raw_locale = $this->filter_post->getString( 'locale' );

		list( $file_type, $language_code, $country_code_and_extension ) = explode( '_', $selected_raw_locale );
		$this->assign( 'language', $language_code );
		$locale = $language_code . '_' . $country_code_and_extension[0] . $country_code_and_extension[1];

		$literals = $this->getLiterals( $selected_instance );
		$this->assign( 'literals', $literals );

		try
		{
			\Sifo\I18N::setDomain( $file_type, $locale, $selected_instance );
			$translations_i18 = \Sifo\I18N::$translations;

			$missing_messages  = array_diff_key( $literals, $translations_i18[$file_type . '_' . $locale] );
			$leftover_messages = array_diff_key( $translations_i18[$file_type . '_' . $locale], $literals );

			$this->assign( 'selected_instance', $selected_instance );
			$this->assign( 'missing_messages', $missing_messages );
			$this->assign( 'leftover_messages', $leftover_messages );
			$this->assign( 'selected_locale', $selected_raw_locale );
			$this->assign( 'selected_charset', $this->filter_post->getString( 'charset' ) );
		}
		catch ( \Sifo\Exception_500 $exception )
		{
			$this->assign( 'error', $exception->getMessage() );
		}
	}