Builds a list of the system languages which can be used in a select option

@param   string  $selected  Client key for the area
@param   string  $basePath  Base path to use

@return  array  List of system languages

@since   1.0
494133
protected function createLanguageList($selected = null, $basePath = JPATH_ROOT)
	{
		$list = array();

		$langHelper = new LanguageHelper;
		$langs      = $langHelper->getKnownLanguages($basePath);

		foreach ($langs as $lang => $metadata)
		{
			$option = array();

			$option['text'] = $metadata['name'];
			$option['value'] = $lang;

			if ($selected && $lang == $selected)
			{
				$option['selected'] = 'selected="selected"';
			}

			$list[] = (object) $option;
		}

		return $list;
	}
951220
public static function getKnownLanguages($basePath = PATH_APP)
	{
		$dir = self::getLanguagePath($basePath);
		$knownLanguages = self::parseLanguageFiles($dir);

		return $knownLanguages;
	}
1086108
private function getAllLanguages(\DOMXPath $xpath)
    {
        $languages = [];

        foreach ($xpath->query('//*[@language]') as $currentNode) {
            $languages[] = $currentNode->getAttribute('language');
        }

        return array_unique($languages);
    }
1259364
public function getLanguageArray($iLanguage = null, $blOnlyActive = false, $blSort = false)
    {
        $myConfig = \OxidEsales\Eshop\Core\Registry::getConfig();

        if (is_null($iLanguage)) {
            $iLanguage = $this->_iBaseLanguageId;
        }

        $aLanguages = [];
        $aConfLanguages = $myConfig->getConfigParam('aLanguages');
        $aLangParams = $myConfig->getConfigParam('aLanguageParams');

        if (is_array($aConfLanguages)) {
            $i = 0;
            reset($aConfLanguages);
            foreach ($aConfLanguages as $key => $val) {
                if ($blOnlyActive && is_array($aLangParams)) {
                    //skipping non active languages
                    if (!$aLangParams[$key]['active']) {
                        $i++;
                        continue;
                    }
                }

                if ($val) {
                    $oLang = new stdClass();
                    $oLang->id = isset($aLangParams[$key]['baseId']) ? $aLangParams[$key]['baseId'] : $i;
                    $oLang->oxid = $key;
                    $oLang->abbr = $key;
                    $oLang->name = $val;

                    if (is_array($aLangParams)) {
                        $oLang->active = $aLangParams[$key]['active'];
                        $oLang->sort = $aLangParams[$key]['sort'];
                    }

                    $oLang->selected = (isset($iLanguage) && $oLang->id == $iLanguage) ? 1 : 0;
                    $aLanguages[$oLang->id] = $oLang;
                }
                ++$i;
            }
        }

        if ($blSort && is_array($aLangParams)) {
            uasort($aLanguages, [$this, '_sortLanguagesCallback']);
        }

        return $aLanguages;
    }
441799
public function getFilesList( $basePath )
    {
        $iterator = new AppendIterator();
        foreach ( $this->getAllHandlers() as $handler )
        {
            $iterator->append( $handler->getFilesList( $basePath ) );
        }
        return $iterator;
    }
194296
public function build($basepath, $language = null)
    {
        $sitemapElements = [];

        foreach ($this->sitemapElementGenerators as $sitemapElementGenerator) {
            $sitemapElements = array_merge(
                $sitemapElements,
                $sitemapElementGenerator->generateElements($language)
            );
        }

        $data = $this
            ->sitemapRenderer
            ->render($sitemapElements, $basepath);

        return $data;
    }
906864
public function listGlobalAliases($languageCode = null, $offset = 0, $limit = -1)
    {
        $urlAliasList = array();
        $spiUrlAliasList = $this->urlAliasHandler->listGlobalURLAliases(
            $languageCode,
            $offset,
            $limit
        );

        foreach ($spiUrlAliasList as $spiUrlAlias) {
            $path = $this->extractPath(
                $spiUrlAlias,
                $languageCode,
                $this->settings['showAllTranslations'],
                $this->settings['prioritizedLanguageList']
            );

            if ($path === false) {
                continue;
            }

            $urlAliasList[] = $this->buildUrlAliasDomainObject($spiUrlAlias, $path);
        }

        return $urlAliasList;
    }
143575
def languages_for_select
      ::I18nData.languages.map{|pair| pair.reverse}.sort{|x,y| x.first <=> y.first}
    end
737218
private function getLanguages($forcedLanguage = null, $fallbackLanguage = null)
    {
        if ($forcedLanguage !== null) {
            $languages = array($forcedLanguage);
        } else {
            $languages = $this->configResolver->getParameter('languages');
        }

        // Always add $fallbackLanguage, even if null, as last entry so that we can fallback to
        // main/initial language if domain supports it.
        $languages[] = $fallbackLanguage;

        return $languages;
    }
19022
public static function getKnownLanguages($basePath = JPATH_ROOT)
	{
		$dir = self::getLanguagePath($basePath);
		$knownLanguages = self::parseLanguageFiles($dir);

		return $knownLanguages;
	}
1348151
public function getLanguages($refresh = false)
    {
        if (empty($this->detection['acceptLanguage']) || $refresh) {
            $this->detectLanguage($this->acceptLanguage);
        }

        return $this->languages;
    }
1217377
public function generate($basePath, $pretty)
    {
        $fileReflectorRegister = new ReflectorRegister();

        $rootPath = $this->executionPath;
        foreach ($this->files as $file) {
            $currentFileArr = $this->isComponent
                ? explode("/$basePath/", $file)
                : explode("$rootPath", $file);

            if (isset($currentFileArr[1])) {
                $currentFile = str_replace('src/', '', $currentFileArr[1]);
            } else {
                throw new \Exception(
                    sprintf('Failed to determine currentFile: %s', $file)
                );
            }

            $isPhp = strrpos($file, '.php') == strlen($file) - strlen('.php');
            $pathInfo = pathinfo($currentFile);
            $servicePath = $pathInfo['dirname'] === '.'
                ? strtolower($pathInfo['filename'])
                : strtolower($pathInfo['dirname'] . '/' . $pathInfo['filename']);
            $id = $this->isComponent
                ? strtolower($basePath) . '/' . $servicePath
                : $servicePath;

            if ($isPhp) {
                $parser = new CodeParser(
                    $file,
                    $fileReflectorRegister,
                    $rootPath,
                    $this->componentId,
                    $this->manifestPath,
                    $this->release,
                    $this->output,
                    $id,
                    $this->isComponent
                );
            } else {
                $content = file_get_contents($file);
                $parser = new MarkdownParser($currentFile, $content, $id);
            }

            $document = $parser->parse();
            if ($document) {
                $writer = new Writer($document, $this->outputPath, $pretty);
                $writer->write($currentFile);

                $this->types->addType([
                    'id' => $id,
                    'title' => $document['title'],
                    'contents' => $servicePath . '.json'
                ]);
            }
        }
    }
1227674
public function select($name, $list = [], $selected = null, array $selectAttributes = [], array $optionsAttributes = [], array $optgroupsAttributes = [])
    {
        $selectAttributes = $this->appendClassToOptions('form-control', $selectAttributes);

        if ($this->hasErrors($name)) {
            $selectAttributes = $this->appendClassToOptions('is-invalid', $selectAttributes);
        }

        return parent::select($name, $list, $selected, $selectAttributes, $optionsAttributes, $optgroupsAttributes);
    }
672706
public static function within($listenerPath, $basePath)
    {
        return collect(static::getListenerEvents(
            (new Finder)->files()->in($listenerPath), $basePath
        ))->mapToDictionary(function ($event, $listener) {
            return [$event => $listener];
        })->all();
    }
155725
public function getLanguageList() {
		$files = glob($this->getPath().'messages_*.php');
		
		$startAt = strlen('messages_');
		$languages = array();
		foreach ($files as $file) {
			$base = basename($file);
			$languages[] = substr($base, $startAt, strrpos($base, '.php') - $startAt);
		}
		return $languages;
	}
313653
public function generate($namespace, $basePath, ClassMetadata $metadata)
    {
        $out = array();
        if (!file_exists($basePath.'/Resources/translations')) {
            mkdir($basePath.'/Resources/translations', 0777, true);
        }
        $out[] = $this->generateLangEn($namespace, $basePath, $metadata);
        $out[] = $this->generateLangfr($namespace, $basePath, $metadata);

        return $out;
    }
1206830
static function languageList( $withVariations = true )
    {
        $languages =& $GLOBALS['eZLocaleLanguageist'];
        if ( !is_array( $languages ) )
        {
            $localeRegexp = eZLocale::localeRegexp( $withVariations, false );
            $languages = array();
            $dir = opendir( 'share/locale' );
            while( ( $file = readdir( $dir ) ) !== false )
            {
                if ( preg_match( "/^$localeRegexp\.ini$/", $file, $regs ) )
                {
                    $languages[] = $regs[1];
                }
            }
            closedir( $dir );
            $languages = array_unique( $languages );
            sort( $languages );
        }
        return $languages;
    }