|
@@ -37,16 +37,13 @@ class Translation {
|
|
|
/* Peuple la liste des langues avec une traduction */
|
|
|
protected function listLanguages() {
|
|
|
$this->languages = array();
|
|
|
- $dir = $this->location.'/'.self::LOCALE_DIR.'/*.json';
|
|
|
- $files = glob($dir);
|
|
|
+ $files = glob($this->location.'/'.self::LOCALE_DIR.'/*.json');
|
|
|
if (is_array($files)) {
|
|
|
foreach($files as $file){
|
|
|
preg_match('/([a-z]{2})\.json$/', $file, $matches);
|
|
|
assert('!empty($matches)');
|
|
|
$this->languages [] = $matches[1];
|
|
|
}
|
|
|
- } else {
|
|
|
- error_log("Unable to browse the language files! ($dir)");
|
|
|
}
|
|
|
}
|
|
|
|