Öffentliche Methoden | |
| getIsoCodes () | |
| lang ($text) | |
| language_from_http () | |
| language_read ($l='') | |
Definiert in Zeile 9 der Datei GlobalFunctions.class.php.
| GlobalFunctions::getIsoCodes | ( | ) |
Definiert in Zeile 11 der Datei GlobalFunctions.class.php.
Wird benutzt von Language::add().
00012 { 00013 global $conf_php; 00014 00015 $iso = parse_ini_file( './language/lang.ini.'.$conf_php ); 00016 asort( $iso ); 00017 return $iso; 00018 }
| GlobalFunctions::lang | ( | $ | text | ) |
Definiert in Zeile 21 der Datei GlobalFunctions.class.php.
Benutzt $SESS.
00022 { 00023 global $SESS; 00024 $text = strtoupper($text); 00025 00026 if ( isset( $SESS['lang'][$text] ) ) 00027 { 00028 return $SESS['lang'][$text]; 00029 } 00030 else 00031 { 00032 return( '?'.$text.'?' ); 00033 } 00034 }
| GlobalFunctions::language_from_http | ( | ) |
Definiert in Zeile 39 der Datei GlobalFunctions.class.php.
Wird benutzt von language_read().
00040 { 00041 global $SESS, 00042 $HTTP_SERVER_VARS, 00043 $conf_php, 00044 $conf; 00045 00046 $languages = $HTTP_SERVER_VARS['HTTP_ACCEPT_LANGUAGE']; 00047 $languages = explode(',',$languages); 00048 foreach( $languages as $l ) 00049 { 00050 $l = substr($l,0,2); 00051 if ( file_exists("./language/$l.ini.$conf_php") ) 00052 return( $l ); 00053 } 00054 00055 // Keine passende Sprache im HTTP-Header gefunden 00056 return $conf['global']['default_language']; 00057 }
| GlobalFunctions::language_read | ( | $ | l = '' |
) |
Definiert in Zeile 60 der Datei GlobalFunctions.class.php.
Benutzt $SESS und language_from_http().
00061 { 00062 global $SESS, 00063 $HTTP_SERVER_VARS, 00064 $conf_php; 00065 00066 $l = language_from_http(); 00067 $SESS['lang'] = parse_ini_file( "./language/$l.ini.$conf_php" ); 00068 }
1.5.8