diff options
| author | roundcube <roundcube@208e9e7b-5314-0410-a742-e7e81cd9613c> | 2005-10-16 19:12:24 +0000 |
|---|---|---|
| committer | roundcube <roundcube@208e9e7b-5314-0410-a742-e7e81cd9613c> | 2005-10-16 19:12:24 +0000 |
| commit | 6d888fda942cbf15e615287dcadce07080bd08fe (patch) | |
| tree | e30f43ad340a65bc27614acf2ac3433a918e04fe /roundcubemail/program/include/main.inc | |
| parent | 7979628549b9fbafcd4961f1e5f03db290f0eabd (diff) | |
Fixed folder display; added Portuguese and Catalan
git-svn-id: https://svn.roundcube.net/trunk@37 208e9e7b-5314-0410-a742-e7e81cd9613c
Diffstat (limited to 'roundcubemail/program/include/main.inc')
| -rw-r--r-- | roundcubemail/program/include/main.inc | 27 |
1 files changed, 27 insertions, 0 deletions
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 ************** |
