From 9fee0ed9af6bb1daa3af2ff7290f5589040b4821 Mon Sep 17 00:00:00 2001 From: thomascube <thomas@roundcube.net> Date: Sun, 16 Oct 2005 15:12:24 -0400 Subject: [PATCH] Fixed folder display; added Portuguese and Catalan --- program/include/main.inc | 27 +++++++++++++++++++++++++++ 1 files changed, 27 insertions(+), 0 deletions(-) diff --git a/program/include/main.inc b/program/include/main.inc index 1c413bb..5eabf75 100644 --- a/program/include/main.inc +++ b/program/include/main.inc @@ -423,6 +423,33 @@ } +// read directory program/localization/ and return a list of available languages +function rcube_list_languages() + { + global $CONFIG, $INSTALL_PATH; + static $sa_languages = array(); + + if (!sizeof($sa_languages)) + { + @include_once($INSTLL_PATH.'program/localization/index.inc'); + + if ($dh = @opendir($INSTLL_PATH.'program/localization')) + { + while (($name = readdir($dh)) !== false) + { + if ($name{0}=='.' || !is_dir($INSTLL_PATH.'program/localization/'.$name)) + continue; + + if ($label = $rcube_languages[$name]) + $sa_languages[$name] = $label ? $label : $name; + } + closedir($dh); + } + } + + return $sa_languages; + } + // ************** template parsing and gui functions ************** -- Gitblit v1.9.1