views:

183

answers:

2

I'm trying to display a spanish price. Spanish prices have the currency symbol AFTER the number, but Symfony insists in placing it before...

Is there any way to move it after the number?

Thanks!

+1  A: 

You need to pass the format_currency function the culture parameter:

<?php echo format_currency('30.00', '€', 'es_ES'); ?>

will produce:

30.00€

Here, 'es_ES' is your country and language combination. If you are unfamiliar with this then read up on symfony and cultures.

Raise
I'd still recommend to read http://www.symfony-project.org/jobeet/1_4/Doctrine/en/19 before reading a bit outdated docs.
develop7
It wasn't clear what version of symfony was being used, and the Definitive Guide is still the best symfony reference. *shrug*
Raise
It's not working. I'm using Symfony 1.4, and of course I have read the official docs and the API (even the source code of the method).I'm using this: format_currency('300000', '€', 'es_ES'), and it's producing this: € 300.000,00
David
I can see it for sf1.4 too. I've checked the es.dat file for problems, but can't find a discrepancy between it and the es.dat files from other symfony versions. I think you may need to raise a ticket with the symfony developers: http://trac.symfony-project.org/report/1
Raise
A: 

It seems to be a bug. It will be solved probably in the next version.

David