Update SiteController

This commit is contained in:
Daniel Supernault 2019-02-27 20:15:18 -07:00
parent 5cb5b5277d
commit ca1814091a
No known key found for this signature in database
GPG key ID: 0DEF1C662C9033F7

View file

@ -6,6 +6,7 @@ use Illuminate\Http\Request;
use App, Auth, Cache, View; use App, Auth, Cache, View;
use App\Util\Lexer\PrettyNumber; use App\Util\Lexer\PrettyNumber;
use App\{Follower, Page, Profile, Status, User, UserFilter}; use App\{Follower, Page, Profile, Status, User, UserFilter};
use App\Util\Localization\Localization;
class SiteController extends Controller class SiteController extends Controller
{ {
@ -31,7 +32,7 @@ class SiteController extends Controller
public function changeLocale(Request $request, $locale) public function changeLocale(Request $request, $locale)
{ {
// todo: add other locales after pushing new l10n strings // todo: add other locales after pushing new l10n strings
$locales = ['en']; $locales = Localization::languages();
if(in_array($locale, $locales)) { if(in_array($locale, $locales)) {
session()->put('locale', $locale); session()->put('locale', $locale);
} }