Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Translatable Extension #31

Open
jralph opened this issue Apr 28, 2017 · 2 comments
Open

Translatable Extension #31

jralph opened this issue Apr 28, 2017 · 2 comments

Comments

@jralph
Copy link

jralph commented Apr 28, 2017

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?

@patrickbrouwers
Copy link
Contributor

Feel free to PR it.

@jralph
Copy link
Author

jralph commented Apr 28, 2017

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants