I am currently able to get currency symbol in symfony2 controller
$formatter = new \NumberFormatter($this->getRequest()->getLocale(),\NumberFormatter::CURRENCY);
$symbol = $formatter->getSymbol(\NumberFormatter::CURRENCY_SYMBOL);
and then pass it to twig.
However, because I need to get this currency symbol in many twig templates, inserting that piece of code in the corresponding controllers is not a pleasant thing to do. So, is there any better/easier way to do this directly in twig?
Thanks.