Fix issues with localizations not applying properly

This commit is contained in:
James Brooks
2016-05-26 11:35:00 +01:00
parent 48c4240c38
commit 2b87629dca
3 changed files with 15 additions and 4 deletions

View File

@@ -61,7 +61,7 @@ class ConfigServiceProvider extends ServiceProvider
$this->app->config->set('app.url', $appDomain);
}
if ($appLocale = $this->app->config->get('setting.app.locale')) {
if ($appLocale = $this->app->config->get('setting.app_locale')) {
$this->app->config->set('app.locale', $appLocale);
$this->app->translator->setLocale($appLocale);
}

View File

@@ -55,8 +55,7 @@ class Localize
*/
public function handle(Request $request, Closure $next)
{
// Early exit optimization.
if (!$this->config->get('setting.automatic_localization')) {
if (!(bool) $this->config->get('setting.automatic_localization')) {
return $next($request);
}

View File

@@ -23,7 +23,7 @@ return [
/*
|--------------------------------------------------------------------------
| Enable subscribers.
| Enable subscribers
|--------------------------------------------------------------------------
|
| Whether to allow people to subscribe to the status page.
@@ -31,4 +31,16 @@ return [
*/
'enable_subscribers' => true,
/*
|--------------------------------------------------------------------------
| Automatic Localization
|--------------------------------------------------------------------------
|
| Whether to automatically localize the status to the visitors default
| browser language settings.
|
*/
'automatic_localization' => false,
];