I'm trying to set a locale and have use that information throughout my
site for languages, currency, and dates. I would assume this is pretty
standard. The problem occurs when setting a locale without a region and
then trying to instantiate a Zend_Currency object using that locale.
Zend_Date seems to handle it OK, but that may just depend on the
language portion of the locale. A snippet of the test is shown below.
Zend_Locale::setDefault('en_US');
$locale = new Zend_Locale('ko');
Zend_Registry::set('Zend_Locale', $locale);
$date = new Zend_Date();
echo "$date<br />\n";
$currency = new Zend_Currency();
echo "$currency<br />\n";
I would guess that the logical fallback should be either the region
portion from the default, or somehow "guess" at a default region for the
corresponding language.
Anyone have any tips on how to proceed and what would be the best way or
shed any other interesting light on this?
Thanks in advance.
Arthur