Hi Arnold! If you're using the SensioGeneratorBundle, it instantiates its own Twig instance (entirely independent of Symfony) to generate the templates. See here: https://github.com/sensio/SensioGeneratorBundle/blob/master/Generator/Generator.php#L27
So, you'd probably need to override that functionality, somehow, potentially by modifying or replacing the tasks that instantiate the specific generator class. Good luck! Ryan Weaver US Office Head & Trainer - KnpLabs - Nashville, TN http://www.knplabs.com <http://www.knplabs.com/en> http://www.thatsquality.com Twitter: @weaverryan On Tue, Dec 6, 2011 at 8:31 AM, Arnold Daniels <[email protected]> wrote: > Hi, > > I'm writing a custom CRUD generator, with a custom skeleton. I want to > have the generated templates localized, so I'm using the 'trans' > filter to translate things like 'Edit' and 'Cancel'. > > Unfortunately this isn't working. I'm running into an error like 'The > filter "trans" does not exist in "actions\/create.php" at line 31'. > > I've checked in TwigEnvironmentPass and 'twig.extension.trans' is > loaded correctly. > > I'm using "Symfony version 2.0.5 - app/dev/debug". > > Can someone tell me how I can make the translator work in the > generator? > > Thanks, > Arnold > > P.S. No, I don't just want to use trans in my view, I do want to > generate the final texts in the template. > > -- > If you want to report a vulnerability issue on symfony, please send it to > security at symfony-project.com > > You received this message because you are subscribed to the Google > Groups "symfony developers" group. > To post to this group, send email to [email protected] > To unsubscribe from this group, send email to > [email protected] > For more options, visit this group at > http://groups.google.com/group/symfony-devs?hl=en > -- If you want to report a vulnerability issue on symfony, please send it to security at symfony-project.com You received this message because you are subscribed to the Google Groups "symfony developers" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/symfony-devs?hl=en
