Vergleich inc/class_language.php - 1.6.4 - 1.6.13

  Keine Änderungen   Hinzugefügt   Modifiziert   Entfernt
Zeile 6Zeile 6
 * Website: http://mybb.com
* License: http://mybb.com/about/license
*

 * Website: http://mybb.com
* License: http://mybb.com/about/license
*

 * $Id: class_language.php 5297 2010-12-28 22:01:14Z Tomm $

 * $Id$

 */

class MyLanguage

 */

class MyLanguage

Zeile 25Zeile 25
	 * @var string
*/
public $language;

	 * @var string
*/
public $language;

 

/**
* The fallback language we are using.
*
* @var string
*/
public $fallback = 'english';


/**
* Information about the current language.


/**
* Information about the current language.

Zeile 112Zeile 119
				}
}
$this->language = $language."/{$area}";

				}
}
$this->language = $language."/{$area}";

 
			$this->fallback = $this->fallback."/{$area}";

		}
}


		}
}


Zeile 136Zeile 144
		{
require_once $lfile;
}

		{
require_once $lfile;
}

 
		elseif(file_exists($this->path."/".$this->fallback."/".$section.".lang.php"))
{
require_once $this->path."/".$this->fallback."/".$section.".lang.php";
}
// Deprecated! This fallback will be removed in future versions!

		elseif(file_exists($this->path."/english/".$section.".lang.php"))
{
require_once $this->path."/english/".$section.".lang.php";
}
else

		elseif(file_exists($this->path."/english/".$section.".lang.php"))
{
require_once $this->path."/english/".$section.".lang.php";
}
else

		{

		{

			if($supress_error != true)
{
die("$lfile does not exist");

			if($supress_error != true)
{
die("$lfile does not exist");

			}
}


			}
}


		// We must unite and protect our language variables!
$lang_keys_ignore = array('language', 'path', 'settings');


		// We must unite and protect our language variables!
$lang_keys_ignore = array('language', 'path', 'settings');


Zeile 164Zeile 177
	}

function sprintf($string)

	}

function sprintf($string)

	{

	{

		$arg_list = func_get_args();
$num_args = count($arg_list);


		$arg_list = func_get_args();
$num_args = count($arg_list);


Zeile 210Zeile 223
	 */
function parse($contents)
{

	 */
function parse($contents)
{

		$contents = preg_replace("#<lang:([a-zA-Z0-9_]+)>#e", "\$this->$1", $contents);

		$contents = preg_replace_callback("#<lang:([a-zA-Z0-9_]+)>#", array($this, 'parse_replace'), $contents);

		return $contents;

		return $contents;

 
	}

/**
* Replace content with language variable.
*
* @param array Matches.
* @return string Language variable.
*/
function parse_replace($matches)
{
return $this->$matches[1];

	}
}
?>

	}
}
?>