twigjs / twig.js

JS implementation of the Twig Templating Language
BSD 2-Clause "Simplified" License
1.88k stars 275 forks source link

Set default settings for number_format #560

Open migue74 opened 6 years ago

migue74 commented 6 years ago

Hello, in PHP we can set the default settings for the number_format filter like this:

$twig->getExtension('core')->setNumberFormat(0, '.', ',');

Is it possible to do the same in twig.js? I want to set the decimal and thousands separator with the locale settings extracted from PHP function localeconv() to avoid doing it in hundreds of values.

Thanks!

willrowe commented 2 years ago

No, this is not currently possible.

Reference in the TwigPHP docs