4
votes

I'm updating a PHP system using Twig with I18n extension to the latest twig 1.0.0-77.

The problem is that Twig can't find Twig_Extension_I18n, when I move it and related files to the appropriate folders from the old version, I get an interface error so it seems that the issue can't be fixed that way.

The "trans" tag has stopped working as well, but since there's a lot of views using that tag, I need it in exact same syntax.

So how do I make the "trans" tag work in the latest twig?

Thanks

1

1 Answers

2
votes

Fabpot has moved that extension into it's own extension repo on Github. To use it you'll need to run the autoloader for initializing Twig with those extensions.

require( "/path/to/Twig-extensions/lib/Twig/Extensions/Autoloader.php" );
Twig_Extensions_Autoloader::register();