X-Git-Url: https://delta.frontaccounting.com/gitweb/?a=blobdiff_plain;f=includes%2Flang%2Flanguage.php;h=5b0509258b109e3271478b2197c5d929053ffe45;hb=063c5f22068dbbd6adccacaf5bd0f66b2eda8e4f;hp=1d6d7d83fb9a7c66e0d6133fb6981e8fac7a564a;hpb=9cec1259fb231d9383beb0a29b261160416ca502;p=fa-stable.git diff --git a/includes/lang/language.php b/includes/lang/language.php index 1d6d7d83..5b050925 100644 --- a/includes/lang/language.php +++ b/includes/lang/language.php @@ -48,7 +48,7 @@ class language function set_language($code) { - global $path_to_root, $installed_languages; + global $path_to_root, $installed_languages, $GetText; $lang = array_search_value($code, $installed_languages, 'code'); $changed = $this->code != $code || $this->version != @$lang['version']; @@ -67,8 +67,8 @@ class language $this->is_locale_file = file_exists($locale); } - $_SESSION['get_text']->set_language($this->code, $this->encoding); - $_SESSION['get_text']->add_domain($this->code, $path_to_root . "/lang", $this->version); + $GetText->set_language($this->code, $this->encoding); + $GetText->add_domain($this->code, $path_to_root . "/lang", $this->version); // Necessary for ajax calls. Due to bug in php 4.3.10 for this // version set globally in php.ini @@ -79,18 +79,15 @@ class language } } -function _set($key,$value) -{ - $_SESSION['get_text']->set_var($key,$value); -} - if (!function_exists("_")) { function _($text) { - if (!isset($_SESSION['get_text'])) // Don't allow using session if not is net. + global $GetText; + if (!isset($GetText)) // Don't allow using gettext if not is net. return $text; - $retVal = $_SESSION['get_text']->gettext($text); + + $retVal = $GetText->gettext($text); if ($retVal == "") return $text; return $retVal;