From ce035ecd582567ea11d9d1c9627759b7073e9c4e Mon Sep 17 00:00:00 2001 From: duergner Date: Tue, 18 Mar 2003 19:40:30 +0000 Subject: [PATCH] *** empty log message *** --- lam/config/language.conf | 4 ++-- lam/templates/login.php | 17 +++++++++++++---- 2 files changed, 15 insertions(+), 6 deletions(-) diff --git a/lam/config/language.conf b/lam/config/language.conf index ac6178f2..7c60e89e 100644 --- a/lam/config/language.conf +++ b/lam/config/language.conf @@ -4,7 +4,7 @@ # Normally you don't have to edit this file manually. It is modified automatically when you add a new language in the Configuration-Site. # Englisch Language -english:English +en_GB:iso639_en:English (Britain) # German Language -german:Deutsch \ No newline at end of file +de_DE:iso639_de:Deutsch (Deutschland) diff --git a/lam/templates/login.php b/lam/templates/login.php index fab8d4cc..b92c5325 100644 --- a/lam/templates/login.php +++ b/lam/templates/login.php @@ -34,11 +34,20 @@ if($action == "checklogin") $config = new Config; $ldap = new Ldap($config); $result = $ldap->connect($username,$passwd); - if($result == True) + if($result == True) // Username/password correct. Doing some configuration and loading main Frame. { - session_register($ldap); - session_register($config); - include("./main.php"); // Username/password correct. Loading main Frame. + session_register($ldap); // register $ldap object in session + session_register($config); // register $config object in session + session_register($language); // register $language in session + + // setting language + $language = explode(":", $language); + putenv("LANG=" . $language[1]); + setlocale("LC_ALL", $language[0]); + bindtextdomain("lam", "../locale"); + textdomain("lam"); + + include("./main.php"); } else {