getLocale(); } /** * Retrieve locale object * * @return Zend_Locale */ public function getLocale() { if (null === $this->_locale) { $options = $this->getOptions(); if(!isset($options['default'])) { $this->_locale = new Zend_Locale(); } elseif(!isset($options['force']) || (bool) $options['force'] == false) { // Don't force any locale, just go for auto detection Zend_Locale::setDefault($options['default']); $this->_locale = new Zend_Locale(); } else { $this->_locale = new Zend_Locale($options['default']); } $key = (isset($options['registry_key']) && !is_numeric($options['registry_key'])) ? $options['registry_key'] : self::DEFAULT_REGISTRY_KEY; Zend_Registry::set($key, $this->_locale); } return $this->_locale; } }