FEATURE: language switch works - changes translations
This commit is contained in:
@@ -4,6 +4,7 @@ use App\Models\File;
|
||||
use App\Models\Language;
|
||||
use Illuminate\Support\Facades\DB;
|
||||
use Illuminate\Support\ServiceProvider;
|
||||
use Mcamara\LaravelLocalization\Facades\LaravelLocalization;
|
||||
use Symfony\Component\Translation\Translator;
|
||||
|
||||
class LaravelLocalizationServiceProvider extends ServiceProvider
|
||||
@@ -28,4 +29,8 @@ class LaravelLocalizationServiceProvider extends ServiceProvider
|
||||
'laravellocalization.hideDefaultLocaleInURL' => true
|
||||
]);
|
||||
}
|
||||
|
||||
public function boot() {
|
||||
\App::setLocale(LaravelLocalization::setLocale());
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,4 @@
|
||||
<?php
|
||||
return [
|
||||
'overview' => 'Seznam všech obsahových stránek',
|
||||
];
|
||||
@@ -1,4 +0,0 @@
|
||||
<?php
|
||||
return [
|
||||
'welcome' => 'Welcome to my page'
|
||||
];
|
||||
Reference in New Issue
Block a user