We could only have the setup/lang/en/ as default.
<?php
$langs = array();
$path = dirname(dirname(__FILE__)).'/lang/';
foreach (new DirectoryIterator($path) as $file) {
$basename = $file->getFilename();
if (!in_array($basename, array('.', '..','.htaccess','.svn','.git')) && $file->isDir()) {
if (file_exists($file->getPathname().'/default.inc.php')) {
$langs[] = $basename;
}
}
}
If it’s a brand new installation, then we’d only have english.
Let’s say, after we’ve downloaded another language package from manager, then each upgrade setup would have more than english option.