php money_format in symfony

Discussion relating to version 1.3.x and 1.4.x

php money_format in symfony

Postby aroncal » Mon Jun 04, 2012 10:57 am

Hello:

I'm trying to use "money_format" native function to print some currencies; i set the monetary locale as this:

Code: Select all
<?php setlocale(LC_MONETARY, 'it_IT'); ?>


And then use the function to print:

Code: Select all
<?php echo money_format('%.2n', 1260.99); ?>


And i get US format:

Code: Select all
$ 1,260.99


The user language preference is set as it_IT and symfony gets it ok. I've been googling a lot but found no answer about the relationship (if any) between PHP's "setLocale(...)" and Symfony's Locale.

I'm using symfony 1.4. Thanks in advance.
aroncal
Junior Member
 
Posts: 3
Joined: Thu Mar 15, 2012 11:53 am

Return to symfony 1.3 and 1.4

Who is online

Users browsing this forum: No registered users and 8 guests