1

I'm using Laravel 5.1 on Homestead. I translate strings with the Xinax/Gettext package (https://github.com/xinax/laravel-gettext). It all works perfectly except for when trying to run a console command containing translatable strings, for example _('Test string').

The error I get is:

[Symfony\Component\Debug\Exception\FatalErrorException]  
Call to undefined function App\Console\Commands\_()

Any ideas on how to get the gettext functionality to work in the console environment?

Mattias
  • 1,111
  • 1
  • 14
  • 23

0 Answers0