I am finding that for some reason I am getting error messages in my
logs that read as such.
No region found within the locale 'en'
When I decided to take a look I set my browser the use a locale first
of 'en' then 'en_US'. When I do so I get errors in my logs that would
read like above. I also am getting blank pages with no content.
Looking around it would seem that the Zend_Currency seems to be
causing the issue.
I am running Zend Framework 1.7.6 with php 5.2.0 latest patch version
from my distribution of Ubuntu 4
According to the documentation the code I have in my bootstrap should
handle the issue of the bad language code but for some reason it
doesn't.
try {
$locale = new Zend_Locale('auto');
} catch (Zend_Locale_Exception $e) {
$locale = new Zend_Locale('en_US');
}
Zend_Registry::set('locale',$locale);
Zend_Registry::set('Zend_Locale', $locale);
I have also tried to use the following in my bootstrap and that has no
better results. From what I understand after 1.5 the following seems
to be the recommended way to go.
Zend_Locale::setDefault('en_US');
$locale = new Zend_Locale();
Zend_Registry::set('locale',$locale);
Zend_Registry::set('Zend_Locale', $locale);
I still am getting these errors which would lead me to think my guests
are getting blank pages if their browser is not set to a locality. How
ca I fix this other then to RIP out all the localization attached to
currencies. I would rather thy to be nicer to visitors of other
languages.
From what I am reading on the site if a language does not have a
locality the the library is supposed to select the first locality
available. This does not seem to be happening.
Is there a fix for this or do I have to add a bunch of additional try/
catch options to my view scripts?