public function listLocaleDir()
{
$result = array('en');
/* Check for existing directory */
if (!is_dir(LOCALE_PATH)) {
return $result;
}
/* Open the directory */
$handle = @opendir(LOCALE_PATH);
/* This can happen if the kit is English-only */
if ($handle === false) {
return $result;
}
/* Process all files */
while (false !== ($file = readdir($handle))) {
$path = LOCALE_PATH . '/' . $file . '/LC_MESSAGES/phpmyadmin.mo';
if ($file != "." && $file != ".." && @file_exists($path)) {
$result[] = $file;
}
}
/* Close the handle */
closedir($handle);
return $result;
}