[ Index ]
 

Code source de eZ Publish 3.9.0

Accédez au Source d'autres logiciels libresSoutenez Angelica Josefina !

title

Body

[fermer]

/lib/ezi18n/classes/ -> eztranslatorhandler.php (source)

   1  <?php
   2  //
   3  // Definition of eZTranslatorHandler class
   4  //
   5  // Created on: <10-Jun-2002 11:05:00 amos>
   6  //
   7  // SOFTWARE NAME: eZ publish
   8  // SOFTWARE RELEASE: 3.9.0
   9  // BUILD VERSION: 17785
  10  // COPYRIGHT NOTICE: Copyright (C) 1999-2006 eZ systems AS
  11  // SOFTWARE LICENSE: GNU General Public License v2.0
  12  // NOTICE: >
  13  //   This program is free software; you can redistribute it and/or
  14  //   modify it under the terms of version 2.0  of the GNU General
  15  //   Public License as published by the Free Software Foundation.
  16  //
  17  //   This program is distributed in the hope that it will be useful,
  18  //   but WITHOUT ANY WARRANTY; without even the implied warranty of
  19  //   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  20  //   GNU General Public License for more details.
  21  //
  22  //   You should have received a copy of version 2.0 of the GNU General
  23  //   Public License along with this program; if not, write to the Free
  24  //   Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
  25  //   MA 02110-1301, USA.
  26  //
  27  //
  28  
  29  /*! \file eztranslatorhandler.php
  30  */
  31  
  32  /*!
  33    \class eZTranslatorHandler eztranslatorhandler.php
  34    \ingroup eZTranslation
  35    \brief Base class for translation handling
  36  
  37  */
  38  
  39  class eZTranslatorHandler
  40  {
  41      /*!
  42       Constructor
  43      */
  44      function eZTranslatorHandler( $is_key_based )
  45      {
  46          $this->IsKeyBased = $is_key_based;
  47      }
  48  
  49      /*!
  50       \return true if the handler can lookup translations with translation keys.
  51  
  52      */
  53      function isKeyBased()
  54      {
  55          return $this->IsKeyBased;
  56      }
  57  
  58      /*!
  59       \pure
  60       \return the translation message for the key \a $key or null if the key does not exist.
  61  
  62       This function must overridden if isKeyBased() is true.
  63      */
  64      function findKey( $key )
  65      {
  66          return null;
  67      }
  68  
  69      /*!
  70       \pure
  71       \return the translation message for \a $source and \a $context or null if the key does not exist.
  72  
  73       If you know the translation key use findKey() instead.
  74  
  75       This function must overridden if isKeyBased() is true.
  76      */
  77      function findMessage( $context, $source, $comment = null )
  78      {
  79          return null;
  80      }
  81  
  82      /*!
  83       \pure
  84       \return the translation string for \a $source and \a $context or null if the translation does not exist.
  85  
  86       \sa findMessage, findKey
  87      */
  88      function translate( $context, $source, $comment = null )
  89      {
  90          return null;
  91      }
  92  
  93      /*!
  94       \pure
  95       \return the translation string for \a $key or null if the translation does not exist.
  96  
  97       \sa findMessage, findKey
  98      */
  99      function keyTranslate( $key )
 100      {
 101          return null;
 102      }
 103  
 104      /// \privatesection
 105      /// Tells whether the handler is key based or not
 106      var $IsKeyBased;
 107  }
 108  
 109  ?>


Généré le : Sat Feb 24 10:30:04 2007 par Balluche grâce à PHPXref 0.7