/[cvs]/nfo/php/libs/org.netfrag.flib/Application/l10n/LocaleText.php
ViewVC logotype

Diff of /nfo/php/libs/org.netfrag.flib/Application/l10n/LocaleText.php

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.1 by joko, Tue Nov 12 05:42:30 2002 UTC revision 1.3 by jonen, Wed Dec 4 07:40:05 2002 UTC
# Line 3  Line 3 
3  //    $Id$  //    $Id$
4  //    ------------------------------------------------------------------  //    ------------------------------------------------------------------
5  //    $Log$  //    $Log$
6    //    Revision 1.3  2002/12/04 07:40:05  jonen
7    //    + comment out dprint
8    //
9    //    Revision 1.2  2002/12/03 03:10:21  joko
10    //    + bugfix regarding new object hierarchy
11    //
12  //    Revision 1.1  2002/11/12 05:42:30  joko  //    Revision 1.1  2002/11/12 05:42:30  joko
13  //    + initial checkin  //    + initial checkin
14  //  //
# Line 47  class LocaleText { Line 53  class LocaleText {
53    // ----------------------------------------------------    // ----------------------------------------------------
54    function LocaleText() {    function LocaleText() {
55      global $cfg, $slt;      global $cfg, $slt;
56      //session_register_safe('slt');      session_register_safe('slt');
57      $this->langs_avail = $cfg[GLBL_LANGSAVAIL];      $this->langs_avail = $cfg[GLBL_LANGSAVAIL];
58      $this->load();      $this->load();
59    }    }
# Line 146  class LocaleText { Line 152  class LocaleText {
152    
153    function setLanguage($langkey_new = "") {    function setLanguage($langkey_new = "") {
154      global $slt;      global $slt;
155      if ($langkey_new) {      //print "setting lang<br>";
156        if ($langkey_new) {
157        $slt[langkey] = $langkey_new;        $slt[langkey] = $langkey_new;
158      }      }
159        $this->load();
160    }    }
161        
162    function load() {    function load() {
163      global $slt;      global $slt;
164    
165      $this->langkey = $slt[langkey];      if (!$this->langkey) { $this->langkey = $slt[langkey]; }
166      if (!$this->langkey) { $this->langkey = $this->_findAvailableLanguage($slt[langkey]); }      if (!$this->langkey) { $this->langkey = $this->_findAvailableLanguage($slt[langkey]); }
167    
168      // print "- starting language-library<br>";      //print "- starting language-library<br>";
169        //print "lang: " . $this->langkey . "<br>";
170      //$langkey_new = $this->_detectLanguage();      //$langkey_new = $this->_detectLanguage();
171      //$this->_loadStructure_FromDb();      //$this->_loadStructure_FromDb();
172      //$this->setLanguage($langkey_new);      //$this->setLanguage($langkey_new);
# Line 178  class LocaleText { Line 187  class LocaleText {
187    }    }
188        
189    function getlt($key, $tpl=array()) {    function getlt($key, $tpl=array()) {
190      dprint("getlt: $key");      //dprint("getlt: $key");
191      if ($ldskey = $this->_dbkey2ldskey($key)) {      if ($ldskey = $this->_dbkey2ldskey($key)) {
192        return $this->_getldsvar($ldskey, $tpl);        return $this->_getldsvar($ldskey, $tpl);
193      }      }

Legend:
Removed from v.1.1  
changed lines
  Added in v.1.3

MailToCvsAdmin">MailToCvsAdmin
ViewVC Help
Powered by ViewVC 1.1.26 RSS 2.0 feed