[ Index ] |
|
Code source de eGroupWare 1.2.106-2 |
1 <?php 2 3 function getLanguages() 4 { 5 GLOBAL $settings; 6 7 $languages = array(); 8 9 $path = $settings->_rootDir . "languages/"; 10 $handle = opendir($path); 11 12 while ($entry = readdir($handle) ) 13 { 14 if ($entry == ".." || $entry == ".") 15 continue; 16 else if (is_dir($path . $entry)) 17 array_push($languages, $entry); 18 } 19 closedir($handle); 20 21 return $languages; 22 } 23 24 include $settings->_rootDir . "languages/" . $settings->_language . "/lang.inc"; 25 26 function getMLText($key, $replace = array()) 27 { 28 GLOBAL $settings, $text; 29 30 if (!isset($text[$key])) 31 return "Error getting Text: " . $key . " (" . $settings->_language . ")"; 32 33 $tmpText = $text[$key]; 34 if (count($replace) == 0) 35 return $GLOBALS['egw']->translation->convert($tmpText,'iso-8859-1',$displayCharset); 36 37 $keys = array_keys($replace); 38 foreach ($keys as $key) 39 $tmpText = str_replace("[".$key."]", $replace[$key], $tmpText); 40 41 return $GLOBALS['egw']->translation->convert($tmpText,'iso-8859-1',$displayCharset); 42 } 43 44 function printMLText($key, $replace = array()) 45 { 46 print getMLText($key, $replace); 47 } 48 49 ?>
titre
Description
Corps
titre
Description
Corps
titre
Description
Corps
titre
Corps
Généré le : Sun Feb 25 17:20:01 2007 | par Balluche grâce à PHPXref 0.7 |