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

Incorrect set defaultLocale in registerLoader() #145

Open
1dnmr opened this issue Nov 10, 2018 · 0 comments
Open

Incorrect set defaultLocale in registerLoader() #145

1dnmr opened this issue Nov 10, 2018 · 0 comments

Comments

@1dnmr
Copy link

1dnmr commented Nov 10, 2018

Hi,

This code incorrect:

protected function registerLoader()
{
...
            $defaultLocale = $app['config']->get('app.locale');
            $loader        = null;
            $source        = $app['config']->get('translator.source');
...
}

Should be replaced with :

            $defaultLocale = config('app.locale');
            $loader        = null;
            $source        = config('translator.source');

When I set locale to my App $app['config'] return what I set and this is not a default locale. Current code lead to a bugs when I use __() and send locale as parameter it's does not work properly.

Or add me as collaborator, a make changes and send pull request.

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

1 participant