msurguy / Honeypot

Simple spam prevention package for Laravel applications
maxoffsky.com/code-blog/implementing-honeypot-spam-prevention-in-laravel-applications/
MIT License
429 stars 44 forks source link

Lang files won't work #12

Closed antonioribeiro closed 10 years ago

antonioribeiro commented 10 years ago

Service Provider boot happens before anything else. You're loading translated messages here: https://github.com/msurguy/Honeypot/blob/master/src/Msurguy/Honeypot/HoneypotServiceProvider.php#L19

So if I add

App::setLocale('another lang');

to my app/start/global.php, it's too late, because the english (default) was already loaded.

msurguy commented 10 years ago

Hmmm I see... What would be a way to prevent this and let users to load custom locale?

antonioribeiro commented 10 years ago

Answered that via https://github.com/msurguy/Honeypot/pull/13.

msurguy commented 10 years ago

Thanks so much!