🚧 Locale settings

This commit is contained in:
MarceauKa 2019-08-29 16:33:17 +02:00
parent ad4d061f4a
commit 6a0ed6885a
5 changed files with 8 additions and 1 deletions

View File

@ -19,6 +19,10 @@ class StoreSettingsRequest extends FormRequest
'min:2',
'max:100',
],
'locale' => [
'required',
'in:fr,en',
],
'is_private' => [
'nullable',
'in:on,off',

View File

@ -23,6 +23,8 @@ class AppServiceProvider extends ServiceProvider
public function boot()
{
$this->app->setLocale(app('shaarli')->getLocale());
View::composer('layouts.partials.scripts', function (\Illuminate\View\View $view) {
$locale = config('app.locale');

View File

@ -2,6 +2,7 @@
return [
'name' => env('APP_NAME'),
'locale' => env('APP_LOCALE'),
'is_private' => false,
'is_dark' => false,
];

View File

@ -25,6 +25,7 @@ but built with [Laravel](https://github.com/laravel/laravel) and [Vue.js](https:
- [x] Original Shaarli import
- [x] RSS feed
- [x] Export
- [x] Dark mode
- [x] i18n (english and french)
## Screenshots

View File

@ -1 +0,0 @@
{"is_private":false,"name":"Shaarli","is_dark":false}