Tooo many changes to list
This commit is contained in:
+15
-28
@@ -177,7 +177,18 @@ $_LANG = Array();
|
||||
|
||||
class Lang {
|
||||
|
||||
public static function get_string($string = '', $module = null, $lang = null) {
|
||||
public static function getStrings($module = '', $lang = null){
|
||||
global $_LANG;
|
||||
if($lang == null){
|
||||
$lang = APP_LANG;
|
||||
}
|
||||
if (isset($_LANG[$lang][$module])) {
|
||||
return $_LANG[$lang][$module];
|
||||
}
|
||||
return $module;
|
||||
}
|
||||
|
||||
public static function getString($string = '', $module = null, $lang = null) {
|
||||
global $_LANG;
|
||||
if($lang == null){
|
||||
$lang = APP_LANG;
|
||||
@@ -191,10 +202,10 @@ class Lang {
|
||||
return $string;
|
||||
}
|
||||
|
||||
public static function build_strings() {
|
||||
public static function buildStrings() {
|
||||
global $_LANG;
|
||||
|
||||
if (isset($_SESSION['cache']['strings'])) {
|
||||
if (isset($_SESSION['cache']['strings']) && CACHE_LANG) {
|
||||
$_LANG = $_SESSION['cache']['strings'];
|
||||
return;
|
||||
}
|
||||
@@ -217,28 +228,4 @@ class Lang {
|
||||
|
||||
abstract class Controller {
|
||||
|
||||
}
|
||||
|
||||
/*function load_view($name, $values = null, $location = null) {
|
||||
|
||||
if (!$location) {
|
||||
$segments = explode('/', debug_backtrace(DEBUG_BACKTRACE_IGNORE_ARGS)[0]['file']);
|
||||
array_pop($segments);
|
||||
$location = implode('/', $segments) . '/views/';
|
||||
}
|
||||
|
||||
if (is_array($values) && count($values) > 0) {
|
||||
extract($values, EXTR_PREFIX_SAME, 'data');
|
||||
}
|
||||
|
||||
$location .= $name;
|
||||
|
||||
if( strpos('.php', $location) == 0){
|
||||
$location .= '.php';
|
||||
}
|
||||
|
||||
if (!file_exists($location)) {
|
||||
//return require_once GENERAL_VIEW_FOLDER . 'errors/404.php';
|
||||
}
|
||||
return require_once( $location );
|
||||
}*/
|
||||
}
|
||||
Reference in New Issue
Block a user