openrat-cms

OpenRat Content Management System
git clone http://git.code.weiherhei.de/openrat-cms.git
Log | Files | Refs

GlobalFunctions.class.php (536B)


      1 <?php
      2 
      3 namespace util;
      4 /**
      5  * Bereitstellen von globalen Funktionen
      6  * @author $Author$
      7  * @version $Revision$
      8  * @package openrat.services
      9  */
     10 class GlobalFunctions
     11 {
     12 	public static function getIsoCodes()
     13 	{
     14 		global $conf_php;
     15 
     16 		$iso = parse_ini_file('./language/lang.ini.' . $conf_php);
     17 		asort($iso);
     18 		return $iso;
     19 	}
     20 
     21 
     22 	public static function lang($text)
     23 	{
     24 		global $SESS;
     25 		$text = strtoupper($text);
     26 
     27 		if (isset($SESS['lang'][$text])) {
     28 			return $SESS['lang'][$text];
     29 		} else {
     30 			return ('?' . $text . '?');
     31 		}
     32 	}
     33 
     34 
     35 }
     36 
     37 ?>