I'm having a problem getting some numbers to display properly using zend.
The country code is for france "fr_FR" Here's the code:
include_once '../classes/zend/library/zend/currency.php';
$value = '2 123,25';
$number = Zend_Locale_Format::getNumber($value, array('precision' => 4, 'locale' => 'fr_FR') );
return $number;
I'm expecting this to return "2123.2500" for insertion into the db, but instead it returns an error of: Zend_Locale_Exception: No localized value in 2 123,25 found, or the given number does not match the localized format
However if I use this $value = '123,25';
as the value everything works fine and the value returned is "123.2500".
Is there a problem with zend handling thousand separators for other locales? If I use "en_US" $2,123.25 returns "2123.25" just fine with no error.
I'm using zend 1.9, I don't have the whole framework installed.
Thanks for any help you can give.