Skip to content

Commit

Permalink
Use get methods to access application locale (#44521)
Browse files Browse the repository at this point in the history
* Fix access config translation service provider

* Fix access config translation service provider
  • Loading branch information
abenevaut authored Oct 9, 2022
1 parent 1066e39 commit 0fbbbf2
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/Illuminate/Translation/TranslationServiceProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -22,11 +22,11 @@ public function register()
// When registering the translator component, we'll need to set the default
// locale as well as the fallback locale. So, we'll grab the application
// configuration so we can easily get both of these values from there.
$locale = $app['config']['app.locale'];
$locale = $app->getLocale();

$trans = new Translator($loader, $locale);

$trans->setFallback($app['config']['app.fallback_locale']);
$trans->setFallback($app->getFallbackLocale());

return $trans;
});
Expand Down

0 comments on commit 0fbbbf2

Please sign in to comment.