Now when you select a language in the dropbox, appears the directory name (codification name). Is more friendly read the language name.
In loginform.include.php:
function getLanguages()
{
$path = "languages";
$dir_handle = @opendir($path) or die(_("Unable to open")." $path");
//echo "<option value=\"\"></option>";
while ($file = readdir($dir_handle))
{
if (!preg_match('#^\.#', $file) && is_dir("$path/$file"))
{
echo "<option value=\"$file\"";
if(strtolower($_SESSION['locale']) == strtolower($file))
echo " selected=\"selected\" ";
echo ">$file</option><br/>";
}
}
closedir($dir_handle);
}
Change the line:
echo ">$file</option><br/>";
And put:
echo ">" . getLanguageName($file) . "</option><br/>";
Where getLanguageName($file) is a function:
function getLanguageName( $file )
{
switch ($file) {
case "en_US.UTF-8":
return "English";
break;
case "es_ES.UTF-8":
return "Castellano";
break;
case "eu_ES.UTF-8":
return "Euskara";
break;
case "zh_CN.UTF-8":
return "Chinese";
break;
case "it_IT.UTF-8/":
return "Italian";
break;
default:
return "unidentified";
}
}
0.33 has this "codification" setup now.