equal
deleted
inserted
replaced
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_Translate |
16 * @package Zend_Translate |
17 * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) |
17 * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) |
18 * @version $Id: Gettext.php 24593 2012-01-05 20:35:02Z matthew $ |
18 * @version $Id$ |
19 * @license http://framework.zend.com/license/new-bsd New BSD License |
19 * @license http://framework.zend.com/license/new-bsd New BSD License |
20 */ |
20 */ |
21 |
21 |
22 /** Zend_Locale */ |
22 /** Zend_Locale */ |
23 require_once 'Zend/Locale.php'; |
23 require_once 'Zend/Locale.php'; |
26 require_once 'Zend/Translate/Adapter.php'; |
26 require_once 'Zend/Translate/Adapter.php'; |
27 |
27 |
28 /** |
28 /** |
29 * @category Zend |
29 * @category Zend |
30 * @package Zend_Translate |
30 * @package Zend_Translate |
31 * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) |
31 * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) |
32 * @license http://framework.zend.com/license/new-bsd New BSD License |
32 * @license http://framework.zend.com/license/new-bsd New BSD License |
33 */ |
33 */ |
34 class Zend_Translate_Adapter_Gettext extends Zend_Translate_Adapter { |
34 class Zend_Translate_Adapter_Gettext extends Zend_Translate_Adapter { |
35 // Internal variables |
35 // Internal variables |
36 private $_bigEndian = false; |
36 private $_bigEndian = false; |
120 |
120 |
121 if ($transtemp[$count * 2 + 1] != 0) { |
121 if ($transtemp[$count * 2 + 1] != 0) { |
122 fseek($this->_file, $transtemp[$count * 2 + 2]); |
122 fseek($this->_file, $transtemp[$count * 2 + 2]); |
123 $translate = fread($this->_file, $transtemp[$count * 2 + 1]); |
123 $translate = fread($this->_file, $transtemp[$count * 2 + 1]); |
124 $translate = explode("\0", $translate); |
124 $translate = explode("\0", $translate); |
125 if ((count($original) > 1) && (count($translate) > 1)) { |
125 if ((count($original) > 1)) { |
126 $this->_data[$locale][$original[0]] = $translate; |
126 $this->_data[$locale][$original[0]] = $translate; |
127 array_shift($original); |
127 array_shift($original); |
128 foreach ($original as $orig) { |
128 foreach ($original as $orig) { |
129 $this->_data[$locale][$orig] = ''; |
129 $this->_data[$locale][$orig] = ''; |
130 } |
130 } |