Open jralph opened 7 years ago
Feel free to PR it.
Will do given chance.
Also needs to update how it gets the default locale. If you use Laravels app()->setLocale($someLocale)
sets the config locale. If you do this in a middleware, it is usually set before the extension is loaded, so the default locale becomes the requested locale, meaning translations are never run, as it thinks the requested is the default. It needs a way to determine the default database locale from somewhere that is not the app's locale.
The translatable extension listens for the
locale.changed
event, in newer versions of Laravel this is incorrect. This event is now a class.$this['events']->dispatch(new Events\LocaleUpdated($locale));
Can this be updated to look for that event instead?