10/21/2008

A Zend_locale Problem:the migration of Zend_Locale

Today, my project based on Zend Framework have this error message:
You
are running Zend_Locale in compatibility mode... please migrate

your scripts.
I search on Google, find this article named::
I18N compatibility mode
So, I change my code in class system_Bootstrap:
private function _buildLocale() {
if (! $this->_locale instanceof Zend_Locale) {
Zend_Locale::$compatibilityMode = false; //add this line
$this->_locale = new Zend_Locale ('zh');
Zend_Registry::set ( 'locale', $this->_locale );
}
return $this->_locale;
}

No comments: