openrat-cms

Unnamed repository; edit this file 'description' to name the repository.
Log | Files | Refs

commit 2159ab44c06351ec66cd7626ca9c9cf4f1af2a78
parent 1ac9635925aae1abb54e0f86d8e8eb4526fdb406
Author: dankert <devnull@localhost>
Date:   Sun, 27 May 2007 22:57:57 +0200

Wenn Sprachschl?ssel nicht gefunden, dann "GLOBAL_" hinzuf?gen und ggf. entfernen.

Diffstat:
functions/language.inc.php | 10+++++++++-
1 file changed, 9 insertions(+), 1 deletion(-)

diff --git a/functions/language.inc.php b/functions/language.inc.php @@ -37,6 +37,14 @@ function lang( $textVar,$vars = array() ) $text = strtoupper($textVar); // Abfrage, ob Textvariable vorhanden ist + if ( !isset( $lang[$text] ) && substr($text,0,9)=='GLOBAL_' ) + $text = substr($text,7); + + // Abfrage, ob Textvariable vorhanden ist + if ( !isset( $lang[$text] )) + $text = 'GLOBAL_'.$text; + + // Abfrage, ob Textvariable vorhanden ist if ( isset( $lang[$text] ) ) { $text = $lang[$text]; @@ -52,7 +60,7 @@ function lang( $textVar,$vars = array() ) // Wenn Textvariable nicht vorhanden ist, dann als letzten Ausweg nur den Variablennamen zurueckgeben - //return( '?'.$text.'?' ); +// return( '?'.$text.'?' ); return( $textVar ); }