Zeile 3 | Zeile 3 |
---|
* MyBB 1.2 * Copyright � 2006 MyBB Group, All Rights Reserved *
|
* MyBB 1.2 * Copyright � 2006 MyBB Group, All Rights Reserved *
|
* Website: http://www.mybboard.com * License: http://www.mybboard.com/eula.html
| * Website: http://www.mybboard.net * License: http://www.mybboard.net/eula.html
|
*
|
*
|
* $Id: class_language.php 2191 2006-09-03 12:11:04Z chris $
| * $Id: class_language.php 3860 2008-05-22 05:25:53Z Tikitiki $
|
*/
class MyLanguage
| */
class MyLanguage
|
Zeile 51 | Zeile 51 |
---|
*/ function language_exists($language) {
|
*/ function language_exists($language) {
|
| $language = preg_replace("#[^a-z0-9\-_]#i", "", $language);
|
if(file_exists($this->path."/".$language.".php")) { return true;
| if(file_exists($this->path."/".$language.".php")) { return true;
|
Zeile 70 | Zeile 71 |
---|
function set_language($language="english", $area="user") { global $mybb;
|
function set_language($language="english", $area="user") { global $mybb;
|
| $language = preg_replace("#[^a-z0-9\-_]#i", "", $language);
// Default language is English. if($language == "") { $language = "english"; }
|
// Check if the language exists. if(!$this->language_exists($language)) { die("Language $language ($this->path/$language) is not installed"); }
|
// Check if the language exists. if(!$this->language_exists($language)) { die("Language $language ($this->path/$language) is not installed"); }
|
$language = trim($language);
// Default language is English. if($language == "") { $language = "english"; }
| |
$this->language = $language; require $this->path."/".$language.".php"; $this->settings = $langinfo;
| $this->language = $language; require $this->path."/".$language.".php"; $this->settings = $langinfo;
|