From 6d888fda942cbf15e615287dcadce07080bd08fe Mon Sep 17 00:00:00 2001 From: roundcube Date: Sun, 16 Oct 2005 19:12:24 +0000 Subject: Fixed folder display; added Portuguese and Catalan git-svn-id: https://svn.roundcube.net/trunk@37 208e9e7b-5314-0410-a742-e7e81cd9613c --- roundcubemail/program/include/main.inc | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) (limited to 'roundcubemail/program/include/main.inc') diff --git a/roundcubemail/program/include/main.inc b/roundcubemail/program/include/main.inc index 1c413bb80..5eabf755d 100644 --- a/roundcubemail/program/include/main.inc +++ b/roundcubemail/program/include/main.inc @@ -423,6 +423,33 @@ function rcube_remote_response($js_code) } +// 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 ************** -- cgit v1.2.3