web/lib/Zend/Locale.php
changeset 807 877f952ae2bd
parent 207 621fa6caec0c
child 1230 68c69c656a2c
equal deleted inserted replaced
805:5e7a0fedabdf 807:877f952ae2bd
    12  * obtain it through the world-wide-web, please send an email
    12  * obtain it through the world-wide-web, please send an email
    13  * to license@zend.com so we can send you a copy immediately.
    13  * to license@zend.com so we can send you a copy immediately.
    14  *
    14  *
    15  * @category  Zend
    15  * @category  Zend
    16  * @package   Zend_Locale
    16  * @package   Zend_Locale
    17  * @copyright  Copyright (c) 2005-2010 Zend Technologies USA Inc. (http://www.zend.com)
    17  * @copyright  Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com)
    18  * @license   http://framework.zend.com/license/new-bsd     New BSD License
    18  * @license   http://framework.zend.com/license/new-bsd     New BSD License
    19  * @version   $Id: Locale.php 22712 2010-07-29 08:24:28Z thomas $
    19  * @version   $Id: Locale.php 24593 2012-01-05 20:35:02Z matthew $
    20  */
    20  */
    21 
    21 
    22 /**
    22 /**
    23  * Base class for localization
    23  * Base class for localization
    24  *
    24  *
    25  * @category  Zend
    25  * @category  Zend
    26  * @package   Zend_Locale
    26  * @package   Zend_Locale
    27  * @copyright  Copyright (c) 2005-2010 Zend Technologies USA Inc. (http://www.zend.com)
    27  * @copyright  Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com)
    28  * @license   http://framework.zend.com/license/new-bsd     New BSD License
    28  * @license   http://framework.zend.com/license/new-bsd     New BSD License
    29  */
    29  */
    30 class Zend_Locale
    30 class Zend_Locale
    31 {
    31 {
    32     /**
    32     /**
   664     public static function getTranslation($value = null, $path = null, $locale = null)
   664     public static function getTranslation($value = null, $path = null, $locale = null)
   665     {
   665     {
   666         require_once 'Zend/Locale/Data.php';
   666         require_once 'Zend/Locale/Data.php';
   667         $locale = self::findLocale($locale);
   667         $locale = self::findLocale($locale);
   668         $result = Zend_Locale_Data::getContent($locale, $path, $value);
   668         $result = Zend_Locale_Data::getContent($locale, $path, $value);
   669         if (empty($result) === true) {
   669         if (empty($result) === true && '0' !== $result) {
   670             return false;
   670             return false;
   671         }
   671         }
   672 
   672 
   673         return $result;
   673         return $result;
   674     }
   674     }