Norgul
Norgul

Reputation: 4783

Zend locale number format

I would like to set up number decimal delimiter based on selected locale, and while I can do this:

Zend_Locale_Format::toNumber($number, array('locale' => $locale, 'precision' => 2));

It doesn't quite work 'globally'. Is there a way to say to format all numbers across the app to conform to selected locale?

Zend version is 1.12

Upvotes: 0

Views: 289

Answers (1)

rcapile
rcapile

Reputation: 11

You can set the default Locale at Bootstrap.php

Zend_Locale::setDefault('pt_BR');

But it will not work for the precision option

Upvotes: 1

Related Questions