Zend Framework allows the usage of an application wide locale. You simply set an
instance of Zend_Locale to the registry with the key
'Zend_Locale'. Then this instance will be used within all locale aware classes of
Zend Framework. This way you set one locale within your registry and then you can forget
about setting it again. It will automatically be used in all other classes. See the
below example for the right usage:
Example 529. Usage of an application wide locale
<?php
// within your bootstrap
$locale = new Zend_Locale('de_AT');
Zend_Registry::set('Zend_Locale', $locale);
// within your model or controller
$date = new Zend_Date();
// print $date->getLocale();
echo $date->getDate();




