vluzrmos / laravel-language-detector

Detect the language for your application using browser preferences, subdomains or route prefixes.
108 stars 25 forks source link

App::getLocale() is not rendering the detected locale #9

Closed mendrinos closed 8 years ago

mendrinos commented 8 years ago

Despite the fact the the language file is being loaded from the correct identified locale - when I do use:

App::getLocale()

I always get the default one - not the one that has been loaded and auto-detected.

Any idea why?

vluzrmos commented 8 years ago

Same as #7 , it is because the language detector doesnt set the config('app.locale'), it just set locale for the Translator instance. I'm thinking about a callback feature, that is under development in develop branch.

Please follow up discussion at #7 pull request.

vluzrmos commented 8 years ago

Released 1.0.10 with callbacks feature.

mendrinos commented 8 years ago

:+1: