aboutsummaryrefslogtreecommitdiff
path: root/app/install.php
diff options
context:
space:
mode:
Diffstat (limited to 'app/install.php')
-rw-r--r--app/install.php27
1 files changed, 4 insertions, 23 deletions
diff --git a/app/install.php b/app/install.php
index cfdd733ce..f54565c73 100644
--- a/app/install.php
+++ b/app/install.php
@@ -42,18 +42,12 @@ function param($key, $default = false) {
// gestion internationalisation
-$translates = array();
-$actual = 'en';
function initTranslate() {
- global $translates;
- global $actual;
-
- $actual = isset($_SESSION['language']) ? $_SESSION['language'] : getBetterLanguage('en');
-
- $file = APP_PATH . '/i18n/' . $actual . '.php';
- if (file_exists($file)) {
- $translates = array_merge($translates, include($file));
+ if (!isset($_SESSION['language'])) {
+ $_SESSION['language'] = getBetterLanguage('en');
}
+
+ Minz_Translate::init();
}
function getBetterLanguage($fallback) {
@@ -75,19 +69,6 @@ function availableLanguages() {
);
}
-function _t($key) {
- global $translates;
- $translate = $key;
- if (isset($translates[$key])) {
- $translate = $translates[$key];
- }
-
- $args = func_get_args();
- unset($args[0]);
-
- return vsprintf($translate, $args);
-}
-
/*** SAUVEGARDES ***/
function saveLanguage() {