diff --git a/src/DateServiceProvider.php b/src/DateServiceProvider.php index 9a8b5db..f06ec69 100644 --- a/src/DateServiceProvider.php +++ b/src/DateServiceProvider.php @@ -17,6 +17,19 @@ class DateServiceProvider extends ServiceProvider * @return void */ public function boot() + { + $this->app['events']->listen('locale.changed', function () { + $this->setLocale(); + }); + + $this->setLocale(); + } + + /** + * Set the locale. + * + */ + protected function setLocale() { $locale = $this->app['translator']->getLocale();