I added tomodomo/twig-pluralize-extension
to my project composer, loaded with a custom module like that :
if (Craft::$app->request->getIsSiteRequest()) {
// Add in our Twig extension
$pluralize = new \Tomodomo\Twig\Pluralize;
Craft::$app->view->registerTwigExtension($pluralize);
}
I use this to pluralize some string in my templates and email templates. When I check the url to my email template, everything work fine but the email didn’t send out because of "unknown function pluralize".
I have another custom module (to handle something else in my emails) and this part work fine.
Do I need to register/declare TwigExtensions with another method to get them work in emails ?
Note:
The only error related to my emails in the logs is about pluralize function missing.
Everything work fine if I don’t use
|pluralize