RSS Feed
^__^

Twig Extension for Money value object

,

I just released a twig extension for https://github.com/sebastianbergmann/money

The money libary contains a money represention based on the currency’s smallest unit to provide a more accurate handling. See the libary’s readme for more information.

Although the v1.x version of Money brings a Formatter the Twig extension uses its own, which is better suited and more flexible.

What it does? See this:

{{ money|money_i18n_format('de_DE') }} 1.123,45 €
{{ money|money_i18n_format('en_US') }} €1,123.45
{{ money|money_i18n_decimal('en_US') }} 1,123.45
{{ money|money_currency_symbol('en_US') }} €
{{ money|money_currency_name('en_US') }} Euro

Check the readme for more information.

One response to “Twig Extension for Money value object”

  1. Petah says:

    The `sebastian/money` is abandoned.

Leave a Reply

Your email address will not be published. Required fields are marked *