1
0
Fork 1
mirror of https://github.com/pixelfed/pixelfed.git synced 2024-12-23 16:24:29 +00:00

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