[ Index ]
 

Code source de LifeType 1.2.4

Accédez au Source d'autres logiciels libres

Classes | Fonctions | Variables | Constantes | Tables

title

Body

[fermer]

/class/locale/ -> bloglocale.class.php (source)

   1  <?php
   2  
   3      /**
   4       * \ingroup Locale
   5       *
   6       * @see Locale
   7       * @see Locales
   8       */
   9  
  10      lt_include( PLOG_CLASS_PATH."class/locale/locale.class.php" );
  11  
  12      class BlogLocale extends Locale  
  13      {
  14  
  15          var $_defaultFolder;
  16          var $_code;    // our ISO locale code, eg. es_ES, en_UK, etc
  17          var $_cache;
  18          var $_messages;
  19          var $_charset;
  20          var $_description;
  21          var $_dateFormat;
  22          var $_firstDayOfWeek;
  23          var $_dataLoaded;
  24  
  25          /**
  26           * Constructor.
  27           *
  28           * @param $code Code follows the Java naming scheme: language_COUNTRY, so
  29           * for example if we want to have the texts translated in the English spoken
  30           * in the UK, we'd have to use en_UK as the code. The two digits country
  31           * code and language code are ISO standards and can be found in
  32           * http://userpage.chemie.fu-berlin.de/diverse/doc/ISO_3166.html (country codes) and
  33           * http://userpage.chemie.fu-berlin.de/diverse/doc/ISO_639.html (language codes)
  34           */
  35  		function BlogLocale( $code )
  36          {
  37              $this->Locale( $code );
  38          }
  39  
  40          /**
  41           * @private
  42           */
  43  		function _loadLocaleFile()
  44          {
  45              $this->_defaultFolder = $this->getLocaleFolder();
  46    
  47              $fileName = $this->_defaultFolder."/locale_".$this->_code.".php";
  48  
  49              if( File::isReadable( $fileName )){
  50                      // TODO: check to see that this is only called once??
  51                  include( $fileName );
  52              }
  53  
  54              // The following is just to handle the case where there isn't
  55              // a valid local file.
  56              if ( !isset($messages) || !is_array( $messages ) ) {
  57                  $messages = array();
  58              }
  59              $this->_messages = $messages;
  60              
  61              $this->_dataLoaded = true;
  62  
  63              unset($messages);
  64          }
  65      }
  66  ?>


Généré le : Mon Nov 26 21:04:15 2007 par Balluche grâce à PHPXref 0.7
  Clicky Web Analytics