$ composer require proficlos/format
use ProfiCloS\Format;
echo Format::currency(1206.45, Format::CURRENCY_USD);
// ... etc
Register in your neon config
services:
filters: ProfiCloS\LatteFilterService
nette.latteFactory:
setup:
- addFilter(format, [ @filters, format ])
Then you can use all formatters in latte
{$price|format:currency}
{$quantity|format:number}