3 |
// $Id$ |
// $Id$ |
4 |
// ------------------------------------------------------------------ |
// ------------------------------------------------------------------ |
5 |
// $Log$ |
// $Log$ |
6 |
|
// Revision 1.2 2002/12/03 03:10:21 joko |
7 |
|
// + bugfix regarding new object hierarchy |
8 |
|
// |
9 |
// Revision 1.1 2002/11/12 05:42:30 joko |
// Revision 1.1 2002/11/12 05:42:30 joko |
10 |
// + initial checkin |
// + initial checkin |
11 |
// |
// |
50 |
// ---------------------------------------------------- |
// ---------------------------------------------------- |
51 |
function LocaleText() { |
function LocaleText() { |
52 |
global $cfg, $slt; |
global $cfg, $slt; |
53 |
//session_register_safe('slt'); |
session_register_safe('slt'); |
54 |
$this->langs_avail = $cfg[GLBL_LANGSAVAIL]; |
$this->langs_avail = $cfg[GLBL_LANGSAVAIL]; |
55 |
$this->load(); |
$this->load(); |
56 |
} |
} |
149 |
|
|
150 |
function setLanguage($langkey_new = "") { |
function setLanguage($langkey_new = "") { |
151 |
global $slt; |
global $slt; |
152 |
if ($langkey_new) { |
//print "setting lang<br>"; |
153 |
|
if ($langkey_new) { |
154 |
$slt[langkey] = $langkey_new; |
$slt[langkey] = $langkey_new; |
155 |
} |
} |
156 |
|
$this->load(); |
157 |
} |
} |
158 |
|
|
159 |
function load() { |
function load() { |
160 |
global $slt; |
global $slt; |
161 |
|
|
162 |
$this->langkey = $slt[langkey]; |
if (!$this->langkey) { $this->langkey = $slt[langkey]; } |
163 |
if (!$this->langkey) { $this->langkey = $this->_findAvailableLanguage($slt[langkey]); } |
if (!$this->langkey) { $this->langkey = $this->_findAvailableLanguage($slt[langkey]); } |
164 |
|
|
165 |
// print "- starting language-library<br>"; |
//print "- starting language-library<br>"; |
166 |
|
//print "lang: " . $this->langkey . "<br>"; |
167 |
//$langkey_new = $this->_detectLanguage(); |
//$langkey_new = $this->_detectLanguage(); |
168 |
//$this->_loadStructure_FromDb(); |
//$this->_loadStructure_FromDb(); |
169 |
//$this->setLanguage($langkey_new); |
//$this->setLanguage($langkey_new); |