Location: PHPKode > scripts > Mix2ool > mix2ool/framework/mixLanguage.php
<?php

class mixLanguage{
	public $languagePath;
	
	protected $_DATA = array();

	public function __set($name, $value){
		$this->_DATA[strtolower($name)] = $value;
	}
	public function __get($name){
		return $this->_DATA[strtolower($name)];
	}
	
	public function __construct($languagePath){
		$this->languagePath = $languagePath;
	}
	
	public function useLang($lang){
		$xml = simplexml_load_file($this->languagePath . "/" . $lang . ".lang");
		if (count($xml->children())){
			foreach ($xml->children() as $language){
				$key = $language["name"];
				$value = $language;
				$this->$key = (string) $value;
			}
		}
		return $this;
	}
}

?>
Return current item: Mix2ool