From: hickert Date: Mon, 5 Dec 2005 06:19:54 +0000 (+0000) Subject: Fixed language setup in helpviewer X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=e474b33288b761727d21e934b04402bf37786c1b;p=gosa.git Fixed language setup in helpviewer git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@2226 594d385d-05f5-0310-b6e9-bd551577e9d8 --- diff --git a/html/helpviewer.php b/html/helpviewer.php index 44377afbd..d51532854 100644 --- a/html/helpviewer.php +++ b/html/helpviewer.php @@ -26,6 +26,7 @@ error_reporting(0); header("Content-type: text/html; charset=UTF-8"); session_start(); +$config= $_SESSION['config']; /* If no config object is found in the session, abort help */ if (!isset($_SESSION['config'])){ @@ -41,6 +42,10 @@ if ($config->data['MAIN']['LANG'] == ""){ $lang= $config->data['MAIN']['LANG']; } +if(isset($_SESSION['ui']->language)){ + $lang = $_SESSION['ui']->language; +} + $lang.=".UTF-8"; putenv("LANGUAGE="); putenv("LANG=$lang"); @@ -67,14 +72,13 @@ if (isset ($config->data['MAIN']['COMPILE'])){ if(isset($_SESSION['helpobject'])){ $helpobject = $_SESSION['helpobject']; }else{ - $helpobject['lang'] = "en"; + $helpobject['lang'] = $lang; $helpobject['helpconf'] = array(); $helpobject['currentplug'] = ""; $helpobject['file'] = "index.html"; $helpobject['helpconf'] = $_SESSION['plist']->gen_headlines(); } -$lang = get_browser_language(); $lang = $lang[0].$lang[1]; $helpobject['lang'] = $lang; @@ -90,7 +94,6 @@ $backward =$defaultpage; $index =$defaultpage; $forward ="node1.html"; - /* Every class which is called within a tab, stores its name in the Session. * If $_SESSION['current_class_for_help'] isset, * get the helpfile specified in the xml file and display it.