FEATURE: language switch works - changes translations

This commit is contained in:
Michal Kváček
2016-07-22 11:57:13 +02:00
parent bab897f01e
commit 2189bbed5e
3 changed files with 9 additions and 4 deletions
@@ -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());
}
}
+4
View File
@@ -0,0 +1,4 @@
<?php
return [
'overview' => 'Seznam všech obsahových stránek',
];
-4
View File
@@ -1,4 +0,0 @@
<?php
return [
'welcome' => 'Welcome to my page'
];