1
0
mirror of https://github.com/BookStackApp/BookStack.git synced 2026-01-03 23:42:28 +03:00

Added option to disable public lang autodetect

Also cleaned up localization middleware a little.
Closes #944
This commit is contained in:
Dan Brown
2018-08-12 13:10:55 +01:00
parent fcdb39e428
commit fcb93dc7c8
2 changed files with 37 additions and 11 deletions

View File

@@ -77,8 +77,21 @@ return [
*/
'locale' => env('APP_LANG', 'en'),
'locales' => ['en', 'de', 'es', 'es_AR', 'fr', 'nl', 'pt_BR', 'sk', 'sv', 'ja', 'pl', 'it', 'ru', 'zh_CN', 'zh_TW'],
/*
|--------------------------------------------------------------------------
| Auto-detect the locale for public users
|--------------------------------------------------------------------------
|
| For public users their locale can be guessed by headers sent by their
| browser. This is usually set by users in their browser settings.
| If not found the default app locale will be used.
|
*/
'auto_detect_locale' => env('APP_AUTO_LANG_PUBLIC', true),
/*
|--------------------------------------------------------------------------
| Application Fallback Locale
@@ -245,7 +258,7 @@ return [
'Activity' => BookStack\Services\Facades\Activity::class,
'Setting' => BookStack\Services\Facades\Setting::class,
'Views' => BookStack\Services\Facades\Views::class,
'Images' => \BookStack\Services\Facades\Images::class,
'Images' => BookStack\Services\Facades\Images::class,
],