|
|
@@ -50,7 +50,14 @@ class Zend_View_Helper_Translate extends Zend_View_Helper_Abstract
|
|
|
*/
|
|
|
public function __construct($translate = null)
|
|
|
{
|
|
|
- if (empty($translate) === false) {
|
|
|
+ if ($translate === null) {
|
|
|
+ require_once 'Zend/Registry.php';
|
|
|
+ if (Zend_Registry::isRegistered('Zend_Translate')) {
|
|
|
+ $translate = Zend_Registry::get('Zend_Translate');
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ if ($translate !== null) {
|
|
|
$this->setTranslator($translate);
|
|
|
}
|
|
|
}
|