Browse Source

Update dispatch.php

pull/674/head
danpros 1 year ago
parent
commit
72018627c6
1 changed files with 1 additions and 5 deletions
  1. +1
    -5
      system/includes/dispatch.php

+ 1
- 5
system/includes/dispatch.php View File

@ -51,12 +51,10 @@ function site_path()
function theme_path() function theme_path()
{ {
if (config('views.root') == null) if (config('views.root') == null)
error(500, '[views.root] is not set'); error(500, '[views.root] is not set');
return site_url() . rtrim(config('views.root'), '/') . '/'; return site_url() . rtrim(config('views.root'), '/') . '/';
} }
function error($code, $message) function error($code, $message)
@ -68,7 +66,6 @@ function error($code, $message)
// Set the language // Set the language
function get_language() function get_language()
{ {
$langID = config('language'); $langID = config('language');
$langFile = 'lang/'. $langID . '.ini'; $langFile = 'lang/'. $langID . '.ini';
@ -80,7 +77,6 @@ function get_language()
i18n('source', 'lang/en_US.ini'); // Load the English language file i18n('source', 'lang/en_US.ini'); // Load the English language file
setlocale(LC_ALL, 'en_US.utf8'); // Change locale to English setlocale(LC_ALL, 'en_US.utf8'); // Change locale to English
} }
} }
// i18n provides strings in the current language // i18n provides strings in the current language
@ -95,7 +91,7 @@ function i18n($key, $value = null)
else else
$_i18n = parse_ini_file('lang/en_US.ini', true); $_i18n = parse_ini_file('lang/en_US.ini', true);
} elseif ($value == null) } elseif ($value == null)
return (isset($_i18n[$key]) ? $_i18n[$key] : '_i18n_' . $key . '_i18n_');
return (isset($_i18n[$key]) ? $_i18n[$key] : $key);
else else
$_i18n[$key] = $value; $_i18n[$key] = $value;
} }


Loading…
Cancel
Save