/**
* Set translation object
*
* @param Zend_Translate|Zend_Translate_Adapter|null $translator
* @return Zend_Validate_Abstract
*/
public function setTranslator($translator = null
) { if ((null ===
$translator) || ($translator instanceof Zend_Translate_Adapter
)) { $this->_translator =
$translator;
} elseif ($translator instanceof Zend_Translate
) { $this->_translator =
$translator->
getAdapter();
} else { throw new Zend_Validate_Exception('Invalid translator specified'
);
} return $this;
} /**
* Return translation object
*
* @return Zend_Translate_Adapter|null
*/