WIP Preorder
This commit is contained in:
@@ -257,10 +257,25 @@ function mfLayoutInclude($filename, $folder = "") {
|
||||
include $inc_path;
|
||||
}
|
||||
|
||||
|
||||
function __($string) {
|
||||
/*
|
||||
* global variable $lang to avoid loading it every time it's accessed
|
||||
*/
|
||||
if(!isset($lang)) {
|
||||
$lang = [];
|
||||
include(BASEDIR . "/lang/de.php");
|
||||
}
|
||||
|
||||
function __($string, $prefix = null) {
|
||||
global $lang;
|
||||
|
||||
if(!$lang) {
|
||||
mfLoghandler::singleton()->debug("Loading language file for __() function");
|
||||
include(BASEDIR . "/lang/de.php");
|
||||
}
|
||||
|
||||
if($prefix) {
|
||||
$string = "$prefix.$string";
|
||||
}
|
||||
|
||||
if (array_key_exists($string, $lang['de'])) {
|
||||
return $lang['de'][$string];
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user