Skip to content

Commit 2b87629

Browse files
committed
Fix issues with localizations not applying properly
1 parent 48c4240 commit 2b87629

File tree

3 files changed

+15
-4
lines changed

3 files changed

+15
-4
lines changed

app/Foundation/Providers/ConfigServiceProvider.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ public function boot()
6161
$this->app->config->set('app.url', $appDomain);
6262
}
6363

64-
if ($appLocale = $this->app->config->get('setting.app.locale')) {
64+
if ($appLocale = $this->app->config->get('setting.app_locale')) {
6565
$this->app->config->set('app.locale', $appLocale);
6666
$this->app->translator->setLocale($appLocale);
6767
}

app/Http/Middleware/Localize.php

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -55,8 +55,7 @@ public function __construct(Repository $config)
5555
*/
5656
public function handle(Request $request, Closure $next)
5757
{
58-
// Early exit optimization.
59-
if (!$this->config->get('setting.automatic_localization')) {
58+
if (!(bool) $this->config->get('setting.automatic_localization')) {
6059
return $next($request);
6160
}
6261

config/setting.php

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,12 +23,24 @@
2323

2424
/*
2525
|--------------------------------------------------------------------------
26-
| Enable subscribers.
26+
| Enable subscribers
2727
|--------------------------------------------------------------------------
2828
|
2929
| Whether to allow people to subscribe to the status page.
3030
|
3131
*/
3232

3333
'enable_subscribers' => true,
34+
35+
/*
36+
|--------------------------------------------------------------------------
37+
| Automatic Localization
38+
|--------------------------------------------------------------------------
39+
|
40+
| Whether to automatically localize the status to the visitors default
41+
| browser language settings.
42+
|
43+
*/
44+
45+
'automatic_localization' => false,
3446
];

0 commit comments

Comments
 (0)