[gefixt in Beta 6] Undefined lanuage string

Hi,

nach der Registrierung des QS- und RRD-Moduls erscheinen in der Menüleiste folgende Einträge:

UNDEFINED LANGUAGE STRING (quickswitch)

und

UNDEFINED LANGUAGE STRING (logginggraphing)

Das ist doch nicht normal, oder?

Wie bekomme ich das „UNDEFINED LANGUAGE STRING“ weg?

Greetz Jimmy

Hi @all

ich habe die Vermutung, dass es an der Datei …\web\base\language.ips liegen könnte, denn die verweist auf den Wert „undefined language“.

Hier ist meine language.ips:

<?
/*

(c) 2005 by Torro / paresy

 * This  library  is  free  software;  you can redistribute it and/or modify it
 * under  the  terms  of the GNU Library General Public License as published by
 * the  Free  Software Foundation; either version 2 of the License, or (at your
 * option) any later version.
 *
 * This  library is distributed in the hope that it will be useful, but WITHOUT
 * ANY  WARRANTY;  without  even  the  implied  warranty  of MERCHANTABILITY or
 * FITNESS  FOR  A  PARTICULAR  PURPOSE.  See  the  GNU  Library General Public
 * License for more details.
 *
 * You  should  have  received a copy of the GNU Library General Public License
 * along  with  this  library;  if  not, write to the Free Software Foundation,
*/
$version = 'V0.70';
$vtext = 'Language Class';

//  Version: 0.70 (25.11.2005)	(paresy) 
//           - Erste Version
//			  
//------------------------------------------------------------------------
class IPS_LanguageSystem {

	private $languagepath;
	private $defaultlanguage = "en"; //Use if $language string is not set
  //------------------------------
	private $currentlanguage;
	private $currentmodule;
	private $currenttemplate;

  /*
  * Constructor
  */ 
	public function __construct( $languagepath="./languages", $language="de" ) 
	{
		$this->languagepath=$languagepath;
		if ( isset($_SESSION['_language']) ) {
			$this->currentlanguage = $_SESSION['_language'];
		} else {
			$this->currentlanguage = $language;
		}
		$this->langarray=Array();
		$this->loadfiles();
	}

  /*
  * Setzt die Sprache nach Anmeldung
  */
  	public function setlanguage($userlanguage) {
		$this->currentlanguage=$userlanguage;
	}

  /*
  * Gibt einen String zurück
  */ 
	private function getstring($strname) {
		if(isset($this->langarray[$this->currentmodule][$this->currentlanguage][$this->currenttemplate])
		&& array_key_exists($strname[1], $this->langarray[$this->currentmodule][$this->currentlanguage][$this->currenttemplate])) {
			return $this->langarray[$this->currentmodule][$this->currentlanguage][$this->currenttemplate][$strname[1]];
		} elseif(isset($this->langarray[$this->currentmodule][$this->defaultlanguage][$this->currenttemplate])
		      && array_key_exists($strname[1], $this->langarray[$this->currentmodule][$this->defaultlanguage][$this->currenttemplate])) {
			return $this->langarray[$this->currentmodule][$this->defaultlanguage][$this->currenttemplate][$strname[1]];	
		} else {
			return "UNDEFINED LANGUAGE STRING {".$strname[1]."}";	
		}	
 	}

  /*
  * Gibt einen String zurück unterangabe vom Modul
  */ 
	public function getmodulestring($strname, $strmodule, $strtemplate) {
		$this->currentmodule=$strmodule;
		$this->currenttemplate=$strtemplate;
		return $this->getstring(Array("", $strname));	
	}

  /*
  * Lädt Sprachdateien
  */ 
	public function loadfiles() {		
		$this->langarray=Array();
		if ($handle = opendir($this->languagepath)) {
			while (false !== ($file = readdir($handle)))  {
				if($file!="." && $file!="..") {
					if ( substr($file,-8) == ".ips.php" ) {
		  			require_once($this->languagepath."/".$file); 
		  			if($lnglang==$this->currentlanguage || $lnglang == $this->defaultlanguage) {
		  				$this->langarray=array_merge_recursive($this->langarray, $lngarray);		  		
		  			}	
		  		}	
		  	}			  	
   		}
		}
	  closedir($handle);
	}
	
  /*
  * Parst Inhalt
  */ 
	public function parse($content, $modulename, $templatename) {
		$this->currentmodule=$modulename;
		$this->currenttemplate=$templatename;
		return preg_replace_callback("/s*{(\w+)}s*/", Array(&$this, "getstring"), $content);
	}
	

}
?>

Vielleicht erkennt jemand meinen Fehler.

Greetz Jimmy

Hallo,

Welche Beta Version hast Du im Einsatz?

Gruss Torro

Hi Torro,

ich „hatte“ die Version 0.70 Beta 4 im Einsatz.

Greetz Jimmy

Hallo,

ja, ich weiss. Ich arbeite das an der Stelle nochmal um, damit es auch mit den Sprachen / Modulen klappt. Dauert allerdings etwas laenger als das Sortierungs Problem…

Gruss Torro

Kein Thema, lass Dir ruhig Zeit. Ist nur eine Schönheitskorrektur. Nichts Gravierendes.

Guts Nächtle.

Greetz Jimmy

Hallo Jimmy,

hatte das selbe Problem, habe einfach die Registrierung der beiden Module noch einmal gemacht und siehe da, schon war alles OK :cool:

Gruss Hofi

[LEFT]Gleiches Problem, gleiche Lösung.
Neuregistrieren hilft.
[/LEFT]