How to convert different local float format to standard float format, using zend?

Posted by Linto davis on Stack Overflow See other posts from Stack Overflow or by Linto davis
Published on 2010-03-23T07:09:39Z Indexed on 2010/03/23 7:13 UTC
Read the original article Hit count: 284

Filed under:

my local is 'en_IN' (ie Zend_Registry::get('Zend_Locale'))

I have to convert the local value to standard float number format

for example

1,235.23 => 1235.23

3.23 => 3.23

I have used the following code

Zend_Locale_Format::getFloat($value, array('locale' => Zend_Registry::get('Zend_Locale')));

it working fine for 1,235.23, and i get the answer 1235.23.

But when i give 3.23 , i get the error on this code

And the error shown as

'No localized value in 3.23 found', This issue is happening in the browser opera, when we set the language is English(IN)(en-IN)

© Stack Overflow or respective owner

Related posts about zend-framework